lib/gris/generators/templates/scaffold/spec/spec_helper.rb in gris-0.2.3 vs lib/gris/generators/templates/scaffold/spec/spec_helper.rb in gris-0.2.4

- old
+ new

@@ -1,13 +1,11 @@ ENV['RACK_ENV'] = 'test' -require 'webmock/rspec' -require 'rack/test' +require File.expand_path('../../config/application', __FILE__) require 'gris/rspec_extensions/response_helpers' +require 'gris/rspec_extensions/active_record_shared_connection' -require File.expand_path('../../config/application', __FILE__) - # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir['./spec/support/**/*.rb'].each { |f| require f } RSpec.configure do |config| @@ -15,13 +13,12 @@ config.mock_with :rspec config.expect_with :rspec config.before(:suite) do ActiveRecord::Migration.maintain_test_schema! - DatabaseCleaner.strategy = :transaction - DatabaseCleaner.clean_with(:truncation) + DatabaseCleaner.strategy = :truncation end - config.before(:each) do + config.before do DatabaseCleaner.clean end end