Clean up cucumber.
This commit is contained in:
parent
ac56a1aefd
commit
457be629ab
|
@ -14,14 +14,14 @@ After do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I generate a new rails application$/ do
|
When 'I generate a new rails application' do
|
||||||
steps %{
|
steps %{
|
||||||
When I run `rails new #{APP_NAME}`
|
When I run `rails new #{APP_NAME}`
|
||||||
And I cd to "#{APP_NAME}"
|
And I cd to "#{APP_NAME}"
|
||||||
And I comment out the gem "turn" from the Gemfile
|
And I comment out the gem "turn" from the Gemfile
|
||||||
And I comment out the gem "coffee-rails" from the Gemfile
|
And I comment out the gem "coffee-rails" from the Gemfile
|
||||||
And I comment out the gem "uglifier" from the Gemfile
|
And I comment out the gem "uglifier" from the Gemfile
|
||||||
And I reset Bundler environment variable
|
And I reset Bundler environment variables
|
||||||
And I set the "BUNDLE_GEMFILE" environment variable to "Gemfile"
|
And I set the "BUNDLE_GEMFILE" environment variable to "Gemfile"
|
||||||
And I successfully run `bundle install --local`
|
And I successfully run `bundle install --local`
|
||||||
}
|
}
|
||||||
|
@ -36,18 +36,18 @@ When /^I configure the application to use "([^\"]+)" from this project$/ do |nam
|
||||||
steps %{And I run `bundle install --local`}
|
steps %{And I run `bundle install --local`}
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I run the rspec generator$/ do
|
When 'I run the rspec generator' do
|
||||||
steps %{
|
steps %{
|
||||||
When I successfully run `rails generate rspec:install`
|
When I successfully run `rails generate rspec:install`
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I configure the application to use rspec\-rails$/ do
|
When 'I configure the application to use rspec-rails' do
|
||||||
append_to_gemfile "gem 'rspec-rails', '~> 2.6.1'"
|
append_to_gemfile "gem 'rspec-rails', '~> 2.6.1'"
|
||||||
steps %{And I run `bundle install --local`}
|
steps %{And I run `bundle install --local`}
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I configure the application to use shoulda-context$/ do
|
When 'I configure the application to use shoulda-context' do
|
||||||
append_to_gemfile "gem 'shoulda-context', '~> 1.0.0'"
|
append_to_gemfile "gem 'shoulda-context', '~> 1.0.0'"
|
||||||
steps %{And I run `bundle install --local`}
|
steps %{And I run `bundle install --local`}
|
||||||
end
|
end
|
||||||
|
@ -56,7 +56,7 @@ When /^I set the "([^"]*)" environment variable to "([^"]*)"$/ do |key, value|
|
||||||
ENV[key] = value
|
ENV[key] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I configure a wildcard route$/ do
|
When 'I configure a wildcard route' do
|
||||||
steps %{
|
steps %{
|
||||||
When I write to "config/routes.rb" with:
|
When I write to "config/routes.rb" with:
|
||||||
"""
|
"""
|
||||||
|
@ -67,7 +67,7 @@ When /^I configure a wildcard route$/ do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I append gems from Appraisal Gemfile$/ do
|
When 'I append gems from Appraisal Gemfile' do
|
||||||
File.read(ENV['BUNDLE_GEMFILE']).split(/\n/).each do |line|
|
File.read(ENV['BUNDLE_GEMFILE']).split(/\n/).each do |line|
|
||||||
if line =~ /^gem "(?!rails|appraisal)/
|
if line =~ /^gem "(?!rails|appraisal)/
|
||||||
append_to_gemfile line.strip
|
append_to_gemfile line.strip
|
||||||
|
@ -75,7 +75,7 @@ When /^I append gems from Appraisal Gemfile$/ do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I reset Bundler environment variable$/ do
|
When 'I reset Bundler environment variables' do
|
||||||
BUNDLE_ENV_VARS.each do |key|
|
BUNDLE_ENV_VARS.each do |key|
|
||||||
ENV[key] = nil
|
ENV[key] = nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue