1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/acceptance/skip_create_spec.rb

20 lines
377 B
Ruby
Raw Normal View History

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
2013-01-18 13:27:57 -05:00
expect(FactoryGirl.create(:user)).not_to be_persisted
end
end