forked from fxposter/nested_form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
50 lines (42 loc) · 1.24 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
47
48
49
50
require 'rubygems'
# require 'appraisal'
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
puts `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
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__)
Rake::Task["spec"].execute
end
task :all do
Rake::Task["spec:rails3_0"].execute
Rake::Task["spec:rails3_1"].execute
Rake::Task["spec:rails3_2"].execute
end
end