[rspec-users] Rspec on rails with out database?

Eric Pugh epugh at opensourceconnections.com
Tue Jul 24 16:26:05 EDT 2007

Hi all,

I am trying to use rspec_on_rails in a Rails app that doesn't have a  
database.  so far I have just been faking it out by dumping in a  
sqlite3 database just to make Rails happy.

I was using for test::unit a rake task that eliminated the calls to  
database prep:

# Added this .rake file to keep Rake happy without a database.
# Remove once a database is in the picture.
["test:units", "test:functionals", "test:integration", "recent"].each  
do |name|

However, adding the spec:models etc doesn't work, I get a "Don't know  
how to build task 'spec:models'" error...

What is the right way of faking out the database?   Using one of the  
Mock frameworks?


OpenSource Connections
Site: http://www.opensourceconnections.com
Blog: http://blog.opensourceconnections.com
Cell: 1-434-466-1467

More information about the rspec-users mailing list