how rspec creates database between specs

Posted by timpone on Stack Overflow See other posts from Stack Overflow or by timpone
Published on 2013-10-22T21:47:34Z Indexed on 2013/10/22 21:53 UTC
Read the original article Hit count: 186

Filed under:
|

This is a bit of a naive / simple question. I'm having a hard time finding this info online. Basically, does rspec run rake db:test:prepare between every rspec group? Or is it between every example or model? Or does the schema get loaded once and then truncated between each. I need to add a rake task directly after this call to create a view since they are not supported in schema.rb.

Either a link or explanation would be greatly appreciated so that I know where to insert my rake task to create a view. Or whether there is a callback like rake db:test:after_prepare

thx

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about rspec