Skip to content

Commit c86b17d

Browse files
lsarniJonRowe
authored andcommitted
Update FactoryGirl to FactoryBot on README (#1899)
1 parent 1a7202d commit c86b17d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ end
197197

198198
The above example uses only standard Rails and RSpec APIs, but many
199199
RSpec/Rails users like to use extension libraries like
200-
[FactoryGirl](https://github.com/thoughtbot/factory_girl) and
200+
[FactoryBot](https://github.com/thoughtbot/factory_bot) and
201201
[Capybara](https://github.com/jnicklas/capybara):
202202

203203
```ruby
204204
require 'rails_helper'
205205

206206
RSpec.describe "home page", :type => :request do
207207
it "displays the user's username after successful login" do
208-
user = FactoryGirl.create(:user, :username => "jdoe", :password => "secret")
208+
user = FactoryBot.create(:user, :username => "jdoe", :password => "secret")
209209
visit "/login"
210210
fill_in "Username", :with => "jdoe"
211211
fill_in "Password", :with => "secret"
@@ -216,7 +216,7 @@ RSpec.describe "home page", :type => :request do
216216
end
217217
```
218218

219-
FactoryGirl decouples this example from changes to validation requirements,
219+
FactoryBot decouples this example from changes to validation requirements,
220220
which can be encoded into the underlying factory definition without requiring
221221
changes to this example.
222222

@@ -228,7 +228,7 @@ docs](http://rubydoc.info/gems/rspec-rails/file/Capybara.md).
228228

229229
There are several other Ruby libs that implement the factory pattern or provide
230230
a DSL for request specs (a.k.a. acceptance or integration specs), but
231-
FactoryGirl and Capybara seem to be the most widely used. Whether you choose
231+
FactoryBot and Capybara seem to be the most widely used. Whether you choose
232232
these or other libs, we strongly recommend using something for each of these
233233
roles.
234234

0 commit comments

Comments
 (0)