spec/spec_helper.rb in curate-0.5.4 vs spec/spec_helper.rb in curate-0.5.5
- old
+ new
@@ -1,12 +1,10 @@
# Configure Rails Environment
ENV["RAILS_ENV"] ||= 'test'
if ENV['COVERAGE']
- require 'simplecov'
- SimpleCov.start 'rails'
- SimpleCov.command_name "spec"
+ require 'coco'
end
require File.expand_path("../internal/config/environment.rb", __FILE__)
# Prevent double spec runs under Zeus
@@ -44,19 +42,21 @@
}
config.use_transactional_fixtures = false
config.before(:suite) do
- ActiveFedora::Base.destroy_all
+ ActiveFedora::TestCleaner.setup
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
+ ActiveFedora::TestCleaner.start
DatabaseCleaner.start
end
config.after(:each) do
+ ActiveFedora::TestCleaner.clean
DatabaseCleaner.clean
end
end