Sha256: 0a2d87ef372addaf26a64f0294b9e221214b7c3eec7b43eef73ecbb8056b205e

Contents?: true

Size: 657 Bytes

Versions: 243

Compression:

Stored size: 657 Bytes

Contents

require "spec_helper"

describe FactoryGirl do
  let(:factory)  { FactoryGirl::Factory.new(:object) }
  let(:sequence) { FactoryGirl::Sequence.new(:email) }
  let(:trait)    { FactoryGirl::Trait.new(:admin) }

  it "finds a registered factory" do
    FactoryGirl.register_factory(factory)
    FactoryGirl.factory_by_name(factory.name).should == factory
  end

  it "finds a registered sequence" do
    FactoryGirl.register_sequence(sequence)
    FactoryGirl.sequence_by_name(sequence.name).should == sequence
  end

  it "finds a registered trait" do
    FactoryGirl.register_trait(trait)
    FactoryGirl.trait_by_name(trait.name).should == trait
  end
end

Version data entries

243 entries across 125 versions & 8 rubygems

Version Path
classiccms-0.6.0 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl_spec.rb
classiccms-0.6.0 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl_spec.rb
classiccms-0.6.0 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl_spec.rb
challah-0.8.1 vendor/bundle/gems/factory_girl-4.0.0/spec/factory_girl_spec.rb
classiccms-0.5.17 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl_spec.rb
classiccms-0.5.17 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl_spec.rb
classiccms-0.5.17 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl_spec.rb
classiccms-0.5.16 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl_spec.rb
classiccms-0.5.16 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl_spec.rb
classiccms-0.5.16 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl_spec.rb
classiccms-0.5.15 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl_spec.rb
classiccms-0.5.15 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl_spec.rb
classiccms-0.5.15 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl_spec.rb
factory_girl-4.1.0 spec/factory_girl_spec.rb
classiccms-0.5.14 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl_spec.rb
classiccms-0.5.14 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl_spec.rb
classiccms-0.5.14 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl_spec.rb
classiccms-0.5.13 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl_spec.rb
classiccms-0.5.13 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl_spec.rb
classiccms-0.5.13 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl_spec.rb