diaspora_federation/lib/tasks/rails4.rake
2016-11-08 00:25:20 +01:00

15 lines
506 B
Ruby

if defined?(RSpec)
namespace :rails4 do
desc "Run all specs that generate fixtures for rspec with rails 4"
RSpec::Core::RakeTask.new(:generate_fixtures) do |t|
t.rspec_opts = ["--tag fixture4"]
end
desc "Run all specs in spec directory (exluding controller specs)"
RSpec::Core::RakeTask.new(:spec) do |task|
task.pattern = FileList["spec/**/*_spec.rb"].exclude("spec/controllers/**/*_spec.rb")
end
task test: %w(spec:prepare_db generate_fixtures spec)
end
end