Skip to content

Commit

Permalink
Create rspec_setup.rb (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikker authored Mar 14, 2024
1 parent 254982b commit f72ce7e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/oaken/rspec_setup.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
RSpec.configure do |config|
config.include(Oaken::Seeds)

config.use_transactional_fixtures = true

config.before(:suite) do
# Mimic fixtures by truncating before inserting.
ActiveRecord::Tasks::DatabaseTasks.truncate_all
Oaken.load_seed
end
end

0 comments on commit f72ce7e

Please sign in to comment.