I had to use database_cleaner to clean up my testing database before each test:
ruby
require 'database_cleaner'DatabaseCleaner.strategy = :truncationclassMiniTest::Spec
before :eachdoDatabaseCleaner.clean
endend
This does not use transactions, although it should be possible somehow with database_cleaner. They have an RSpec example on their GitHub page which maybe could work.
Ryan could have done this because it's more Ruby 1.9 to omit the hash rocket now and personally I think his syntax is looking cleaner.
But you're right that the as: option is unnecessary.
I had to use database_cleaner to clean up my testing database before each test:
This does not use transactions, although it should be possible somehow with database_cleaner. They have an RSpec example on their GitHub page which maybe could work.
Ryan could have done this because it's more Ruby 1.9 to omit the hash rocket now and personally I think his syntax is looking cleaner.
But you're right that the as: option is unnecessary.