debian-mirror-gitlab/spec/support/helpers/rendered_helpers.rb
2022-07-16 19:58:13 +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