if ENV['DB'] has mongodb then run rake mongoid else spec
This commit is contained in:
parent
a51158eabd
commit
f718ce5122
2
Gemfile
2
Gemfile
|
@ -33,6 +33,6 @@ else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['DB'] == 'mongodb'
|
if ENV['DB'] =~ /mongodb/
|
||||||
gem 'mongoid', '~> 4.0.0', require: false
|
gem 'mongoid', '~> 4.0.0', require: false
|
||||||
end
|
end
|
||||||
|
|
8
Rakefile
8
Rakefile
|
@ -13,7 +13,13 @@ RSpec::Core::RakeTask.new(:mongoid) do |rspec|
|
||||||
rspec.rspec_opts = ['--backtrace']
|
rspec.rspec_opts = ['--backtrace']
|
||||||
end
|
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"
|
desc "Open an irb session with Ransack and the sample data used in specs"
|
||||||
task :console do
|
task :console do
|
||||||
|
|
Loading…
Reference in New Issue