Permalink
Browse files

improve test running

- add rake and bundler to the development dependencies
- less strict rspec-rails requirement to allow the latest 2.x rspec
  versions
- use rails 3.2 gemfile as default
  • Loading branch information...
1 parent 9f17a16 commit a4ba6bfc04f2d6c1c18d32e24ebccb1fcadf138e @lest lest committed Jun 4, 2012
Showing with 24 additions and 18 deletions.
  1. +2 −2 .travis.yml
  2. +11 −0 Gemfile
  3. +8 −13 Rakefile
  4. +0 −2 gemfiles/Gemfile.rails3_2
  5. +3 −1 nested_form.gemspec
View
@@ -7,9 +7,9 @@ rvm:
- rbx-18mode
- rbx-19mode
gemfile:
- - gemfiles/Gemfile.rails3_0
+ - Gemfile
- gemfiles/Gemfile.rails3_1
- - gemfiles/Gemfile.rails3_2
+ - gemfiles/Gemfile.rails3_0
before_script: "sh -c 'cd spec/dummy && rake db:migrate RAILS_ENV=test'"
script: "xvfb-run rake"
notifications:
View
11 Gemfile
@@ -0,0 +1,11 @@
+source :rubygems
+
+gemspec
+
+gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
+gem 'sqlite3', :platforms => :ruby
+gem 'simple_form'
+gem 'formtastic'
+gem 'rake'
+gem 'capybara'
+gem 'rails', '~> 3.2.0'
View
@@ -15,35 +15,30 @@ task :default => :spec
namespace :db do
task :migrate do
- puts `cd spec/dummy && rake db:migrate RAILS_ENV=test && rake db:migrate RAILS_ENV=development`
+ system 'cd spec/dummy && rake db:migrate RAILS_ENV=test && rake db:migrate RAILS_ENV=development'
end
end
namespace :spec do
task :install do
- puts `bundle install --gemfile=gemfiles/Gemfile.rails3_0`
- puts `bundle install --gemfile=gemfiles/Gemfile.rails3_1`
- puts `bundle install --gemfile=gemfiles/Gemfile.rails3_2`
- end
-
- task :rails3_0 do
- ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_0', __FILE__)
- Rake::Task["spec"].execute
+ system 'bundle install'
+ system 'bundle install --gemfile=gemfiles/Gemfile.rails3_0'
+ system 'bundle install --gemfile=gemfiles/Gemfile.rails3_1'
end
task :rails3_1 do
ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_1', __FILE__)
Rake::Task["spec"].execute
end
- task :rails3_2 do
- ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_2', __FILE__)
+ task :rails3_0 do
+ ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_0', __FILE__)
Rake::Task["spec"].execute
end
task :all do
- Rake::Task["spec:rails3_0"].execute
+ Rake::Task["spec"].execute
Rake::Task["spec:rails3_1"].execute
- Rake::Task["spec:rails3_2"].execute
+ Rake::Task["spec:rails3_0"].execute
end
end
@@ -1,2 +0,0 @@
-instance_eval File.read(File.expand_path('../Gemfile.base', __FILE__))
-gem "rails", "~> 3.2.0"
View
@@ -10,7 +10,9 @@ Gem::Specification.new do |s|
s.files = Dir["{lib,spec,vendor}/**/*", "[A-Z]*"] - ["Gemfile.lock"]
s.require_path = "lib"
- s.add_development_dependency "rspec-rails", "~> 2.6.0"
+ s.add_development_dependency "rake"
+ s.add_development_dependency "bundler"
+ s.add_development_dependency "rspec-rails", "~> 2.6"
s.add_development_dependency "mocha"
s.rubyforge_project = s.name

0 comments on commit a4ba6bf

Please sign in to comment.