2010-11-10 15:59:38 -05:00
|
|
|
When /^I add "([^"]+)" from this project as a dependency$/ do |gem_name|
|
2011-09-08 12:30:26 -04:00
|
|
|
append_to_file('Gemfile', %{gem "#{gem_name}", :path => "#{PROJECT_ROOT}"\n})
|
|
|
|
end
|
|
|
|
|
|
|
|
When /^I add "([^"]+)" as a dependency$/ do |gem_name|
|
|
|
|
append_to_file('Gemfile', %{gem "#{gem_name}"\n})
|
2010-06-09 11:42:48 -04:00
|
|
|
end
|
2012-11-29 05:46:29 -05:00
|
|
|
|
|
|
|
When /^I set the FactoryGirl :suffix option to "([^"]+)"$/ do |suffix|
|
|
|
|
append_to_file('config/application.rb', <<-RUBY)
|
|
|
|
module Testapp
|
|
|
|
class Application < Rails::Application
|
|
|
|
config.generators do |g|
|
|
|
|
g.fixture_replacement :factory_girl, :suffix => '#{suffix}'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
end
|