Rakefile in pose-3.0.0 vs Rakefile in pose-3.1.1
- old
+ new
@@ -1,16 +1,48 @@
#!/usr/bin/env rake
+
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
-APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
-load 'rails/tasks/engine.rake'
-
Bundler::GemHelper.install_tasks
# RSpec tasks.
require 'rspec/core/rake_task'
-RSpec::Core::RakeTask.new :spec
-task :default => :spec
+
+RSpec::Core::RakeTask.new :spec_mysql do
+ ENV['POSE_ENV'] = 'mysql'
+end
+
+RSpec::Core::RakeTask.new :spec_mysql2 do
+ ENV['POSE_ENV'] = 'mysql2'
+end
+
+RSpec::Core::RakeTask.new :spec_sqlite do
+ ENV['POSE_ENV'] = 'sqlite'
+end
+
+RSpec::Core::RakeTask.new :spec_postgres do
+ ENV['POSE_ENV'] = 'postgres'
+end
+
+RSpec::Core::RakeTask.new :spec_mysql_ci do
+ ENV['POSE_ENV'] = 'mysql_ci'
+end
+
+RSpec::Core::RakeTask.new :spec_mysql2_ci do
+ ENV['POSE_ENV'] = 'mysql2_ci'
+end
+
+RSpec::Core::RakeTask.new :spec_sqlite_ci do
+ ENV['POSE_ENV'] = 'sqlite_ci'
+end
+
+RSpec::Core::RakeTask.new :spec_postgres_ci do
+ ENV['POSE_ENV'] = 'postgres_ci'
+end
+
+task :test_ci => [:spec_sqlite_ci, :spec_postgres_ci, :spec_mysql2_ci]
+task :test => [:spec_sqlite, :spec_postgres, :spec_mysql2]
+task :default => :test_ci