forked from activeadmin/activeadmin
/
Rakefile
27 lines (22 loc) · 851 Bytes
/
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
require "bundler"
Bundler.setup
Bundler::GemHelper.install_tasks
require 'rake'
def cmd(command)
puts command
system command
end
require File.expand_path('../spec/support/detect_rails_version', __FILE__)
# Import all our rake tasks
FileList['tasks/**/*.rake'].each { |task| import task }
# Run the specs & cukes
task :default do
# Force spec files to be loaded and ran in alphabetical order.
specs_unit = Dir['spec/unit/**/*_spec.rb'].sort.join(' ')
specs_integration = Dir['spec/integration/**/*_spec.rb'].sort.join(' ')
exit [
cmd("export RAILS=3.0.5 && export RAILS_ENV=test && bundle exec rspec #{specs_unit}"),
cmd("export RAILS=3.0.5 && export RAILS_ENV=test && bundle exec rspec #{specs_integration}"),
cmd("export RAILS=3.0.5 && export RAILS_ENV=cucumber && bundle exec cucumber features"),
].uniq == [true]
end