1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/Rakefile
Jared Beck 94b9306647 Finish the conversion to RSpec
- Convert serializers/mixin_json_test.rb to rspec
- Convert functional/thread_safety_test.rb to rspec
- Convert functional/controller_test.rb to rspec
- Move the dummy app from test to spec, delete test dir
2017-06-10 01:45:46 -04:00

38 lines
991 B
Ruby

require "bundler"
Bundler::GemHelper.install_tasks
desc "Set a relevant database.yml for testing"
task :prepare do
ENV["DB"] ||= "sqlite"
FileUtils.cp(
"spec/dummy_app/config/database.#{ENV['DB']}.yml",
"spec/dummy_app/config/database.yml"
)
end
require "rake/testtask"
desc "Run tests on PaperTrail with Test::Unit."
Rake::TestTask.new(:test) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = "test/**/*_test.rb"
t.verbose = false
# Enabling ruby interpreter warnings (-w) is, sadly, impractical. There are
# too many noisy warnings that we have no control over, e.g. caused by libs we
# depend on.
t.warning = false
end
require "rspec/core/rake_task"
desc "Run tests on PaperTrail with RSpec"
task(:spec).clear
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = false # hide list of specs bit.ly/1nVq3Jn
end
require "rubocop/rake_task"
RuboCop::RakeTask.new
desc "Default: run all available test suites"
task default: %i[rubocop prepare test spec]