gitlab-org--gitlab-foss/spec/support/helpers/rendered_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
313 B
Ruby
Raw Normal View History

# 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