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

David Chelimsky dchelimsky at gmail.com
Mon Sep 29 07:36:04 EDT 2008

On Mon, Sep 29, 2008 at 5:10 AM, Fernando Perez <lists at ruby-forum.com> wrote:
>> Is there a way to skip database initialization? Because it takes too
>> much time to run each test.
> So do you handle data inside the testing environment. Let's say: Given
> there are 2 products available on the site.
> Currently I am using 1.upto(2) do |i|; Product.create!(:title =>
> "title#{i}"...); ... end
> But this uses the testing DB isn't it?

Yes, but that's OK w/ cucumber. This isn't unit testing.

>> 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 example for that?
> I fixed this problem, it was related to my other problem about
> request.domain during tests. With Story Runner, it gets set to
> example.com, whereas during controller testing it is set to test.host.
> --
> 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