Skip to content

Instantly share code, notes, and snippets.

@Epigene Epigene/bout3.rb
Created Oct 14, 2017

Embed
What would you like to do?
FC.build_stubbed vs other FC strategies
describe "FactoryGirl.build_stubbed VS [FactoryGirl.build, FactoryGirl.create]" do
subject { book.with_characteristics?(options) }
let(:options) { {author_name: book.author.name, publisher_name: book.publisher.name} }
bout3_number_of = 200
context "when setting up with FactoryGirl.build_stubbed" do
let(:book) { build_stubbed(:book) }
bout3_number_of.times do
it { is_expected.to eq(true) }
end
end
context "when setting up with FactoryGirl.build" do
let(:book) { build(:book) }
bout3_number_of.times do
it { is_expected.to eq(true) }
end
end
context "when setting up with FactoryGirl.create" do
let(:book) { create(:book) }
bout3_number_of.times do
it { is_expected.to eq(true) }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.