Skip to content

Instantly share code, notes, and snippets.

@minghz
Last active January 1, 2020 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minghz/0fa62d378b3ef53d4499e3986a4eb464 to your computer and use it in GitHub Desktop.
Save minghz/0fa62d378b3ef53d4499e3986a4eb464 to your computer and use it in GitHub Desktop.
Making MiniTest work like RSpec - pt4
around(:all) do |&block|
ActiveRecord::Base.transaction do
super(&block)
raise ActiveRecord::Rollback
end
end
before(:all) do
setup_fixtures
# Creating a lot of DB entries for example
# Perhaps some of them using fixture data
end
after(:all) do
teardown_fixtures
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment