Sha256: 50bb85a869779af9a8cd82e285e051179f21ccfed88367bcb3e148909ec744c2

Contents?: true

Size: 255 Bytes

Versions: 10

Compression:

Stored size: 255 Bytes

Contents

RSpec::Matchers.define :have_trait do |trait_name|
  match do |instance|
    instance.defined_traits.any? do |trait|
      trait.name == trait_name && trait.send(:block) == @block
    end
  end

  chain :with_block do |block|
    @block = block
  end
end

Version data entries

10 entries across 7 versions & 4 rubygems

Version Path
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/factory_girl-4.5.0/spec/support/matchers/trait.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/factory_girl-4.5.0/spec/support/matchers/trait.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/factory_girl-4.5.0/spec/support/matchers/trait.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/factory_girl-4.5.0/spec/support/matchers/trait.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/factory_girl-4.4.0/spec/support/matchers/trait.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/factory_girl-4.4.0/spec/support/matchers/trait.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/factory_girl-4.4.0/spec/support/matchers/trait.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/factory_girl-4.4.0/spec/support/matchers/trait.rb
factory_girl-4.5.0 spec/support/matchers/trait.rb
factory_girl-4.4.0 spec/support/matchers/trait.rb