Created
October 14, 2017 16:53
-
-
Save Epigene/63e1d2871b4e497ee58605f37731908d to your computer and use it in GitHub Desktop.
FC.build_stubbed vs other FC strategies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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