Sha256: bbd42edd0d698dc5c11639cb445c7fe156e8e21a0128f78b00b325ad0043e448

Contents?: true

Size: 640 Bytes

Versions: 16

Compression:

Stored size: 640 Bytes

Contents

require 'spec_helper'

describe FactoryGirl::Declaration::Implicit do
  let(:name)        { :author }
  let(:declaration) { FactoryGirl::Declaration::Implicit.new(name) }
  subject           { declaration.to_attributes.first }

  context "with a known factory" do
    before do
      FactoryGirl.factories.stubs(:registered? => true)
    end

    it { should be_association }
    its(:factory) { should eq name }
  end

  context "with a known sequence" do
    before do
      FactoryGirl.sequences.stubs(:registered? => true)
    end

    it { should_not be_association }
    it { should be_a(FactoryGirl::Attribute::Sequence) }
  end
end

Version data entries

16 entries across 13 versions & 5 rubygems

Version Path
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/factory_girl-4.5.0/spec/factory_girl/declaration/implicit_spec.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/factory_girl-4.5.0/spec/factory_girl/declaration/implicit_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/factory_girl-4.5.0/spec/factory_girl/declaration/implicit_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/factory_girl-4.5.0/spec/factory_girl/declaration/implicit_spec.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/factory_girl-4.4.0/spec/factory_girl/declaration/implicit_spec.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/factory_girl/declaration/implicit_spec.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/factory_girl/declaration/implicit_spec.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/factory_girl-4.4.0/spec/factory_girl/declaration/implicit_spec.rb
factory_girl-4.5.0 spec/factory_girl/declaration/implicit_spec.rb
factory_girl-4.4.0 spec/factory_girl/declaration/implicit_spec.rb
factory_girl-4.3.0 spec/factory_girl/declaration/implicit_spec.rb
challah-1.0.0 vendor/bundle/gems/factory_girl-4.2.0/spec/factory_girl/declaration/implicit_spec.rb
challah-1.0.0.beta3 vendor/bundle/gems/factory_girl-4.2.0/spec/factory_girl/declaration/implicit_spec.rb
challah-1.0.0.beta2 vendor/bundle/gems/factory_girl-4.2.0/spec/factory_girl/declaration/implicit_spec.rb
challah-1.0.0.beta vendor/bundle/gems/factory_girl-4.2.0/spec/factory_girl/declaration/implicit_spec.rb
factory_girl-4.2.0 spec/factory_girl/declaration/implicit_spec.rb