[rspec-users] When is spec_helper.rb actually executed?

Wes Gamble lists at ruby-forum.com
Wed Oct 8 19:40:51 EDT 2008

OK, got it.

I have a follow-up question though.  If a given spec DID NOT require 
spec_helper.rb, doesn't that imply that the spec would be run against 
the Rails "development" environment.

I just did a test where I printed out the configuration of one of my 
classes DB connnections (e.g. Blah.connection.inspect where Blah is an 
AR model).  And I saw that the "database" setting in this was 
development.  My spec definitely inserts data into the DB.

I kind of expected to see additional rows in the table in question.

But I just realized that each spec is probably surrounded by a 
transaction - is that correct?


Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list