tasks/test.rake in andrewroth_activeadmin-0.3.4.3 vs tasks/test.rake in andrewroth_activeadmin-0.3.4.4
- old
+ new
@@ -9,30 +9,32 @@
desc "Run the full suite"
task :test => ['spec:unit', 'spec:integration', 'cucumber', 'cucumber:class_reloading']
namespace :test do
- desc "Run the full suite against the important versions of rails"
- task :major_supported_rails do
+ def run_tests_against(*versions)
current_version = detect_rails_version if File.exists?("Gemfile.lock")
- ["3.0.10", "3.1.0"].each do |version|
+ versions.each do |version|
puts
puts "== Using Rails #{version}"
- if File.exists?("Gemfile.lock")
- puts "Removing the current Gemfile.lock"
- cmd "rm Gemfile.lock"
- end
-
- cmd "export RAILS=#{version} && ./script/use_rails #{version}"
- cmd "export RAILS=#{version} && bundle exec rspec spec/unit"
- cmd "export RAILS=#{version} && bundle exec rspec spec/integration"
- cmd "export RAILS=#{version} && bundle exec cucumber features"
- cmd "export RAILS=#{version} && bundle exec cucumber -p class-reloading features"
+ cmd "./script/use_rails #{version}"
+ cmd "bundle exec rspec spec"
+ cmd "bundle exec cucumber features"
+ cmd "bundle exec cucumber -p class-reloading features"
end
+
cmd "./script/use_rails #{current_version}" if current_version
end
+
+ desc "Run the full suite against the important versions of rails"
+ task :major_supported_rails do
+ run_tests_against "3.0.11", "3.1.3"
+ end
+
+ desc "Alias for major_supported_rails"
+ task :all => :major_supported_rails
end
require 'rspec/core/rake_task'