File: Rakefile

package info (click to toggle)
ruby-hashie-forbidden-attributes 0.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: ruby: 150; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (3)
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
begin
  require 'bundler/setup'
rescue LoadError
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end

Bundler::GemHelper.install_tasks

require 'rake/testtask'

Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.libs << 'test'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = false
end

require 'rubocop/rake_task'
Rubocop::RakeTask.new(:rubocop)

task :migrate_db do
  Dir.chdir('test/dummy') do
    `bundle exec rake db:migrate db:test:prepare`
  end
end

task test: :migrate_db

task default: [:rubocop, :test]