forked from ryanb/nested_form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
46 lines (39 loc) · 1.14 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'rubygems'
require 'rake'
begin
require 'rspec/core/rake_task'
desc "Run RSpec"
RSpec::Core::RakeTask.new do |t|
t.verbose = false
end
rescue LoadError
puts "You should run rake spec:install in order to install all corresponding gems!"
end
task :default => :spec
namespace :db do
task :migrate do
system 'cd spec/dummy && rake db:migrate RAILS_ENV=test && rake db:migrate RAILS_ENV=development'
end
end
namespace :spec do
task :install do
system 'bundle install'
ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_1', __FILE__)
system 'bundle install'
ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_0', __FILE__)
system 'bundle install'
end
task :rails3_1 do
ENV['BUNDLE_GEMFILE'] = File.expand_path('../gemfiles/Gemfile.rails3_1', __FILE__)
Rake::Task["spec"].execute
end
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"].execute
Rake::Task["spec:rails3_1"].execute
Rake::Task["spec:rails3_0"].execute
end
end