[rspec-users] Lot's o' questions about Cucumbert

David Chelimsky dchelimsky at gmail.com
Mon Sep 29 07:34:50 EDT 2008

On Sun, Sep 28, 2008 at 4:24 PM, Fernando Perez <lists at ruby-forum.com> wrote:
> Thank you David,
> Is there a way to skip database initialization? Because it takes too
> much time to run each test. Is there a similar way to mock objects or
> create objects and have them "saved" in memory? I don't understand how
> to do that.

Recommended practice is to use the database so you're exercising as
close to the full stack as possible. Depending on whether or not you
use any custom sql, you could try running against an in-memory sqlite3


> I use for instance Product.create!(:title => 'title', :price => '15'),
> but I am not sure the object gets saved or is accessible by RSpec. Do
> you have an exmaple for that?
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list