module Helpers

taken from github.com/rspec/rspec-rails/blob/master/spec/support/helpers.rb

Public Instance Methods

metadata_with(additional_metadata) click to toggle source
# File spec/support/helpers.rb, line 8
def metadata_with(additional_metadata)
  ::RSpec.describe("example group").metadata.merge(additional_metadata)
end
stub_metadata(additional_metadata) click to toggle source
# File spec/support/helpers.rb, line 3
def stub_metadata(additional_metadata)
  stub_metadata = metadata_with(additional_metadata)
  allow(RSpec::Core::ExampleGroup).to receive(:metadata) { stub_metadata }
end