Truncate tables on each spec

1.0
Fernando Blat 14 years ago
parent b88f5a7797
commit 257cb1536e

@ -10,13 +10,9 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config| RSpec.configure do |config|
config.mock_with :mocha config.mock_with :mocha
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
# config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
# config.use_transactional_fixtures = true
config.include CartoDB::Factories config.include CartoDB::Factories
config.before(:each) do
Rails::Sequel.connection.tables.each{ |t| next if t == :schema_migrations; Rails::Sequel.connection[t].truncate }
end
end end

Loading…
Cancel
Save