Permalink
Browse files

Update feature to use factory_girl 2.0 syntax

  • Loading branch information...
1 parent 7cdd05d commit eb93acd292d878ee6fd9bbbef62b923a1a98aa80 @joshuaclayton joshuaclayton committed Jun 29, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 features/load_definitions.feature
@@ -24,8 +24,10 @@ Feature: automatically load step definitions
"""
When I write to "test/factories.rb" with:
"""
- Factory.define :user do |user|
- user.name 'Frank'
+ FactoryGirl.define do
+ factory :user do
+ name "Frank"
+ end
end
"""
When I write to "test/unit/user_test.rb" with:
@@ -34,7 +36,7 @@ Feature: automatically load step definitions
class UserTest < ActiveSupport::TestCase
test "use factory" do
- user = Factory(:user)
+ user = FactoryGirl.create(:user)
assert_equal 'Frank', user.name
end
end

0 comments on commit eb93acd

Please sign in to comment.