mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Test against Rails 3.2, 4.0, 4.1
* Remove gemfiles from version control to match same testing style as Clearance and Suspenders. * MiniTest does not need to be manually included as it is automatically included by Rails by default. * Add spring for Rails 4.1. * Disable Spring to get specs to pass on Rails 4.1. * Add therubyrhino for JRuby. * Remove old references to Rails 3. * Fix JRuby test where output is "1 runs", not "1 tests". * Remove Rails 3.0 reference to "turn".
This commit is contained in:
parent
e206e73698
commit
00cb2eabb1
14 changed files with 172 additions and 428 deletions
|
|
@ -1,5 +1,5 @@
|
|||
When /^I run `([^"]+)` with a clean environment$/ do |command|
|
||||
step %{I successfully run `ruby -e 'system({"BUNDLE_GEMFILE" => nil}, "#{command}")'`}
|
||||
step %{I successfully run `ruby -e 'system({"BUNDLE_GEMFILE" => nil, "DISABLE_SPRING" => "true"}, "#{command}")'`}
|
||||
end
|
||||
|
||||
# system({'BUNDLE_GEMFILE' => nil}, "cd tmp/aruba/testapp && #{command} && cd -")
|
||||
|
|
|
|||
|
|
@ -19,6 +19,14 @@ When /^I set the FactoryGirl :suffix option to "([^"]+)"$/ do |suffix|
|
|||
|
||||
end
|
||||
|
||||
When /^I print out "([^"]*)"$/ do |path|
|
||||
in_current_dir do
|
||||
File.open(path, 'r') do |f|
|
||||
puts f.inspect
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
When /^I configure the factories as:$/ do |string|
|
||||
append_to_file File.join('config', 'application.rb'), <<-END
|
||||
class Testapp::Application
|
||||
|
|
@ -37,19 +45,6 @@ end
|
|||
END
|
||||
end
|
||||
|
||||
When /^I configure the testing framework to use MiniTest$/ do
|
||||
append_to_file('Gemfile', %{gem "minitest-rails", :group => [:development, :test]\n})
|
||||
step %{I run `rails generate mini_test:install` with a clean environment}
|
||||
|
||||
append_to_file File.join('config', 'application.rb'), <<-END
|
||||
class Testapp::Application
|
||||
config.generators do |g|
|
||||
g.test_framework :mini_test, :fixture => false, :fixture_replacement => :factory_girl
|
||||
end
|
||||
end
|
||||
END
|
||||
end
|
||||
|
||||
When /^I comment out gem "([^"]*)" from my Gemfile$/ do |gem_name|
|
||||
in_current_dir do
|
||||
content = File.read('Gemfile')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue