Sha256: 080601ad2cdb573c20b86f94294a8dd42dc9afef4efaefc9f204c869d4d32e6b

Contents?: true

Size: 373 Bytes

Versions: 142

Compression:

Stored size: 373 Bytes

Contents

require "spec_helper"

describe "skipping the default create" do
  before do
    define_model("User", email: :string)

    FactoryGirl.define do
      factory :user do
        skip_create

        email "john@example.com"
      end
    end
  end

  it "doesn't execute anything when creating the instance" do
    FactoryGirl.create(:user).should_not be_persisted
  end
end

Version data entries

142 entries across 82 versions & 6 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
challah-1.0.0.beta vendor/bundle/gems/factory_girl-4.1.0/spec/acceptance/skip_create_spec.rb
challah-0.9.1.beta.3 vendor/bundle/gems/factory_girl-4.1.0/spec/acceptance/skip_create_spec.rb
challah-0.9.1.beta vendor/bundle/gems/factory_girl-4.1.0/spec/acceptance/skip_create_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/spec/acceptance/skip_create_spec.rb
challah-0.9.0 vendor/bundle/gems/factory_girl-4.1.0/spec/acceptance/skip_create_spec.rb
classiccms-0.6.9 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/skip_create_spec.rb
classiccms-0.6.9 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/skip_create_spec.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/skip_create_spec.rb