debian-mirror-gitlab/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

2022-07-16 23:28:13 +05:30
# 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