debian-mirror-gitlab/spec/support/helpers/rendered_helpers.rb

13 lines
313 B
Ruby
Raw Permalink 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