Browse files

Update Factory Girl examples to replace deprecated syntax

  • Loading branch information...
1 parent 6b03bf8 commit 13bf2a4d32165af17da63de605809ad36ac8e20c @bricker bricker committed Jun 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.md
View
4 README.md
@@ -130,7 +130,7 @@ users like to use extension libraries like FactoryGirl and Capybara:
```ruby
describe "home page" do
it "displays the user's username after successful login" do
- user = Factory(:user, :username => "jdoe", :password => "secret")
+ user = FactoryGirl.create(:user, :username => "jdoe", :password => "secret")
visit "/login"
fill_in "Username", :with => "jdoe"
fill_in "Password", :with => "secret"
@@ -181,7 +181,7 @@ end
describe WidgetsController do
describe "GET index" do
it "assigns all widgets to @widgets" do
- widget = Factory(:widget)
+ widget = FactoryGirl.create(:widget)
get :index
assigns(:widgets).should eq([widget])
end

0 comments on commit 13bf2a4

Please sign in to comment.