Permalink
Browse files

expose the factory girl syntax convenience methods to rspec and cucumber

  • Loading branch information...
1 parent 95ff9ba commit 7130e1155f128929a474fecfa685d36526a7116f @mjankowski mjankowski committed Apr 6, 2012
@@ -18,6 +18,11 @@ def raise_delivery_errors
replace_in_file "config/environments/development.rb", "raise_delivery_errors = false", "raise_delivery_errors = true"
end
+ def enable_factory_girl_syntax
+ copy_file "factory_girl_syntax_rspec.rb", "spec/support/factory_girl.rb"
+ copy_file "factory_girl_syntax_cucumber.rb", "features/support/factory_girl.rb"
+ end
+
def setup_staging_environment
run "cp config/environments/production.rb config/environments/staging.rb"
end
@@ -48,6 +48,7 @@ def remove_files_we_dont_need
def setup_development_environment
say "Setting up the development environment"
build(:raise_delivery_errors)
+ build(:enable_factory_girl_syntax)
end
def setup_staging_environment
@@ -0,0 +1 @@
+World(FactoryGirl::Syntax::Methods)
@@ -0,0 +1,3 @@
+RSpec.configure do |config|
+ config.include FactoryGirl::Syntax::Methods
+end

0 comments on commit 7130e11

Please sign in to comment.