diff options
Diffstat (limited to 'spec/support/helpers/rendered_helpers.rb')
-rw-r--r-- | spec/support/helpers/rendered_helpers.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/helpers/rendered_helpers.rb b/spec/support/helpers/rendered_helpers.rb new file mode 100644 index 00000000000..137b7d5f708 --- /dev/null +++ b/spec/support/helpers/rendered_helpers.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module RenderedHelpers + # Wraps the `rendered` in `expect` to make it the target of an expectation. + # Designed to read nicely for one-liners. + # rubocop:disable RSpec/VoidExpect + def expect_rendered + render + expect(rendered) + end + # rubocop:enable RSpec/VoidExpect +end |