Sha256: 0814dd9611c86a44cfab75a2fb48c572afbc76d143125aa5585cdd7263885401

Contents?: true

Size: 222 Bytes

Versions: 245

Compression:

Stored size: 222 Bytes

Contents

RSpec::Matchers.define :have_trait do |trait_name|
  match do |instance|
    instance.defined_traits.include?(FactoryGirl::Trait.new(trait_name, &@block))
  end

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

Version data entries

245 entries across 126 versions & 8 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.3.0/spec/support/matchers/trait.rb
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.2.0/spec/support/matchers/trait.rb
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.0.0/spec/support/matchers/trait.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.2.0/spec/support/matchers/trait.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.3.0/spec/support/matchers/trait.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.0.0/spec/support/matchers/trait.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.2.0/spec/support/matchers/trait.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.3.0/spec/support/matchers/trait.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.0.0/spec/support/matchers/trait.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/factory_girl-2.6.4/spec/support/matchers/trait.rb
factory_girl-4.3.0 spec/support/matchers/trait.rb
challah-1.0.0 vendor/bundle/gems/factory_girl-4.2.0/spec/support/matchers/trait.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.0.0/spec/support/matchers/trait.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.3.0/spec/support/matchers/trait.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.2.0/spec/support/matchers/trait.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.2.0/spec/support/matchers/trait.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.3.0/spec/support/matchers/trait.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.0.0/spec/support/matchers/trait.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.0.0/spec/support/matchers/trait.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.3.0/spec/support/matchers/trait.rb