if ENV['DB'] has mongodb then run rake mongoid else spec

This commit is contained in:
Zhomart Mukhamejanov 2014-08-03 22:48:13 -07:00
parent a51158eabd
commit f718ce5122
2 changed files with 8 additions and 2 deletions

View File

@ -33,6 +33,6 @@ else
end
end
if ENV['DB'] == 'mongodb'
if ENV['DB'] =~ /mongodb/
gem 'mongoid', '~> 4.0.0', require: false
end

View File

@ -13,7 +13,13 @@ RSpec::Core::RakeTask.new(:mongoid) do |rspec|
rspec.rspec_opts = ['--backtrace']
end
task :default => :spec
task :default do
if ENV['DB'] =~ /mongodb/
Rake::Task["mongoid"].invoke
else
Rake::Task["spec"].invoke
end
end
desc "Open an irb session with Ransack and the sample data used in specs"
task :console do