@@ -197,15 +197,15 @@ end
197
197
198
198
The above example uses only standard Rails and RSpec APIs, but many
199
199
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
201
201
[ Capybara] ( https://github.com/jnicklas/capybara ) :
202
202
203
203
``` ruby
204
204
require ' rails_helper'
205
205
206
206
RSpec .describe " home page" , :type => :request do
207
207
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" )
209
209
visit " /login"
210
210
fill_in " Username" , :with => " jdoe"
211
211
fill_in " Password" , :with => " secret"
@@ -216,7 +216,7 @@ RSpec.describe "home page", :type => :request do
216
216
end
217
217
```
218
218
219
- FactoryGirl decouples this example from changes to validation requirements,
219
+ FactoryBot decouples this example from changes to validation requirements,
220
220
which can be encoded into the underlying factory definition without requiring
221
221
changes to this example.
222
222
@@ -228,7 +228,7 @@ docs](http://rubydoc.info/gems/rspec-rails/file/Capybara.md).
228
228
229
229
There are several other Ruby libs that implement the factory pattern or provide
230
230
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
232
232
these or other libs, we strongly recommend using something for each of these
233
233
roles.
234
234
0 commit comments