Displaying 6 results from an estimated 6 matches for "transactional_fixtures".
2011 Feb 08
1
Why use DatabaseCleaner with rSpec?
Hi list,
I''ve used DatabaseCleaner in the past, but only when using Cucumber
and Selenium (or Steak + Celerity) since turning on
transactional_fixtures would prevent the data being accessible from
app-server that is also triggered for the tests. This works fine, and
is a de-facto solution for this problem.
I don''t see why I would want to use DatabaseCleaner with rspec though,
since everything is in the same process, transactional_fixture...
2006 Sep 11
4
Using rspec and mocha
I prefer to use rspec than test::unit for developing my apps. However
I''ve found its mocking library to be pretty inflexible compared to
Mocha. This isn''t really a surprise since rspec isn''t intended as a
mocking framework, whereas Mocha is. So I''d like to play to both of
their strengths and use rspec as my testing/specification framework
and Mocha do to
2006 Sep 11
4
Using rspec and mocha
I prefer to use rspec than test::unit for developing my apps. However
I''ve found its mocking library to be pretty inflexible compared to
Mocha. This isn''t really a surprise since rspec isn''t intended as a
mocking framework, whereas Mocha is. So I''d like to play to both of
their strengths and use rspec as my testing/specification framework
and Mocha do to
2006 Apr 16
7
Problem running unit tests
...would like to add proper testing from here on out.
Currently when I type rake in my application directory, it attempts to load
my unit tests (all generated files with single default assertion), but
immediately fails with the error:
./test/unit/../test_helper.rb:18: undefined method
''use_transactional_fixtures=''
I read up on transactional_fixtures and testing in general and also searched
this list and in Google, but haven''t been able to find any reference to this
problem. It is probably something stupid simple, but I am at a dead end for
now.
Has anyone else run into this? At this p...
2006 Mar 27
1
Tests not tiding up after themselves?
Hello,
My tests are messing with one another because it seems that they
aren''t cleaning the database after execution. I have the tables
headlines and articles. And the articles table has a foreign key to
the headlines table. My schema structure is created by this script
----
drop table if exists changes;
drop table if exists articles;
drop table if exists headlines;
create table
2008 May 20
5
How to write a test for validates_uniqueness_of
Hi,
I have a spec
it "should have a unique username "
I have a code:
validates_uniqueness_of :user_name
Now, I don''t know how to test this code. In order to test this, do I
need to run `save`?
For example,
@user = User.create(:username => "mike")
@another = User.create(:username => "mike")
@another.save.should be_false
This messes up test