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
sunrise-cms-0.3.2 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.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
sunrise-cms-0.3.1 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.0 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
sunrise-cms-0.3.0 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
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
sunrise-cms-0.3.0.rc 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.0.rc vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/support/helpers.rb
rspec-rails-2.10.1 spec/support/helpers.rb
rspec-rails-2.10.0 spec/support/helpers.rb
ammeter-0.2.5 spec/support/helpers.rb
ammeter-0.2.4 spec/support/helpers.rb
rspec-rails-2.9.0 spec/support/helpers.rb
rspec-rails-2.9.0.rc2 spec/support/helpers.rb
ammeter-0.2.3 spec/support/helpers.rb
rspec-rails-2.8.1 spec/support/helpers.rb
rspec-rails-2.8.0 spec/support/helpers.rb
ammeter-0.2.2 spec/support/helpers.rb
rspec-rails-2.8.0.rc2 spec/support/helpers.rb