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
rspec-rails-2.8.0.rc1 spec/support/helpers.rb
ammeter-0.2.1 spec/support/helpers.rb
rspec-rails-2.7.0 spec/support/helpers.rb
ammeter-0.2.0 spec/support/helpers.rb
rspec-rails-2.7.0.rc1 spec/support/helpers.rb
ammeter-0.1.3 spec/support/helpers.rb
ammeter-0.1.2 spec/support/helpers.rb
ammeter-0.1.1 spec/support/helpers.rb
ammeter-0.1.0 spec/support/helpers.rb
ammeter-0.0.3 spec/support/helpers.rb
ammeter-0.0.2 spec/support/helpers.rb
ammeter-0.0.1 spec/support/helpers.rb
rspec-rails-2.6.1 spec/support/helpers.rb
rspec-rails-2.6.1.beta1 spec/support/helpers.rb
rspec-rails-2.6.0 spec/support/helpers.rb
rspec-rails-2.6.0.rc6 spec/support/helpers.rb
rspec-rails-2.6.0.rc4 spec/support/helpers.rb
rspec-rails-2.6.0.rc2 spec/support/helpers.rb
rspec-rails-2.5.0 spec/support/helpers.rb
rspec-rails-2.4.1 spec/support/helpers.rb