mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
README points to gemcutter and typo fix
This commit is contained in:
parent
690102afd2
commit
3287ed8dee
1 changed files with 4 additions and 5 deletions
|
@ -9,12 +9,11 @@ Github: http://github.com/thoughtbot/factory_girl/tree/master
|
||||||
Gem:
|
Gem:
|
||||||
gem install factory_girl --source http://gemcutter.org
|
gem install factory_girl --source http://gemcutter.org
|
||||||
|
|
||||||
Note: if you install factory_girl using the gem from Github, you'll need this
|
Note: if you install factory_girl using the gem from Gemcutter, you'll need this
|
||||||
in your environment.rb if you want to use Rails 2.1+'s dependency manager:
|
in your environment.rb if you want to use Rails 2.1+'s dependency manager:
|
||||||
|
|
||||||
config.gem "thoughtbot-factory_girl",
|
config.gem "factory_girl",
|
||||||
:lib => "factory_girl",
|
:source => "http://gemcutter.org"
|
||||||
:source => "http://gems.github.com"
|
|
||||||
|
|
||||||
== Defining factories
|
== Defining factories
|
||||||
|
|
||||||
|
@ -82,7 +81,7 @@ The default strategy can be overriden:
|
||||||
|
|
||||||
user = Factory(:user)
|
user = Factory(:user)
|
||||||
|
|
||||||
No matter which startegy is used, it's possible to override the defined attributes by passing a hash:
|
No matter which strategy is used, it's possible to override the defined attributes by passing a hash:
|
||||||
|
|
||||||
# Build a User instance and override the first_name property
|
# Build a User instance and override the first_name property
|
||||||
user = Factory.build(:user, :first_name => 'Joe')
|
user = Factory.build(:user, :first_name => 'Joe')
|
||||||
|
|
Loading…
Add table
Reference in a new issue