debian-mirror-gitlab/spec/support/helpers/rendered_helpers.rb
2022-07-17 14:43:12 +02:00

12 lines
313 B
Ruby

# 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