-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathRakefile
More file actions
29 lines (25 loc) · 787 Bytes
/
Rakefile
File metadata and controls
29 lines (25 loc) · 787 Bytes
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
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
# load rspec so we can set up the environment correctly using spec_helper
require 'rspec/core/rake_task'
require_relative './spec/spec_helper.rb'
RSpec::Core::RakeTask.new(:spec)
Bundler::GemHelper.install_tasks
# load our dummy app so we have access to rails rake tasks such as db:create and db:migrate
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
begin
load 'rails/tasks/engine.rake'
rescue LoadError
# for Rails 3.0.x we need to load the Rakefile directly, as the engine rake task doesn't exist
load APP_RAKEFILE
end
task(:default).clear
task :default => [
'db:create',
'db:migrate',
'spec'
]