Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2 from desmondmonster/master
Browse files Browse the repository at this point in the history
Use .build for model specs
  • Loading branch information
oggy committed May 20, 2013
2 parents 0ffb679 + 5cbc7cf commit 6884ed8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -320,10 +320,11 @@ You can generate a PDF or an HTML copy of this guide using
* Use Factory Girl or Mechanize to make real objects.
* It is acceptable to mock other models or child objects.
* Create the model for all examples in the spec to avoid duplication.
* Avoid unnecessary database calls.

```Ruby
describe Article
let(:article) { FactoryGirl.create(:article) }
let(:article) { FactoryGirl.build(:article) }
end
```

Expand Down

0 comments on commit 6884ed8

Please sign in to comment.