Sha256: 1bfcc8284287428dc64c6bab160a477385008b90c7c7b9136f75e61c220f8068

Contents?: true

Size: 520 Bytes

Versions: 83

Compression:

Stored size: 520 Bytes

Contents

module Helpers
  def stub_metadata(additional_metadata)
    stub_metadata = metadata_with(additional_metadata)
    RSpec::Core::ExampleGroup.stub(:metadata) { stub_metadata }
  end

  def metadata_with(additional_metadata)
    m = RSpec::Core::Metadata.new
    m.process("example group")

    group_metadata = additional_metadata.delete(:example_group)
    if group_metadata
      m[:example_group].merge!(group_metadata)
    end
    m.merge!(additional_metadata)
    m
  end

  RSpec.configure {|c| c.include self}
end

Version data entries

83 entries across 78 versions & 6 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/spec/support/helpers.rb
rspec-rails-3.0.0.beta1 spec/support/helpers.rb
rspec-rails-2.99.0.beta1 spec/support/helpers.rb
rspec-rails-2.14.0 spec/support/helpers.rb
ammeter-0.2.9 spec/support/helpers.rb
rspec-rails-2.13.1 spec/support/helpers.rb
rspec-rails-2.13.0 spec/support/helpers.rb
rspec-rails-2.12.2 spec/support/helpers.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
rspec-rails-2.12.1 spec/support/helpers.rb
rspec-rails-2.12.0 spec/support/helpers.rb
rspec-rails-2.11.4 spec/support/helpers.rb
gem_repackager-0.1.0 support/gems/rspec-rails-2.11.0/spec/support/helpers.rb
rspec-rails-2.11.0 spec/support/helpers.rb
ammeter-0.2.8 spec/support/helpers.rb
ammeter-0.2.7 spec/support/helpers.rb
ammeter-0.2.6 spec/support/helpers.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb