Forum: Ruby on Rails Problem regarding folder based fixtures and test code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ashrafuz Z. (Guest)
on 2009-02-16 05:52
We use folder based fixtures for each controllers and models.
Here is how we load them in test classes,

  fixtures :shippers, :users, :user_types
  def fixture_path
    File.join(File.dirname(__FILE__), "../fixtures/shipper_controller")
  end

Now individually each test code passes But testing the project(running
all test at once) fails for some test code. We are assuming that some
fixtures are not cleaned or some fixtures caused error inserting in
database.

We used FixtureScenarios plugin to resolve that problem.
But FixtureScenarios do not provide facilities for flexible fixture as
it was originally developed for rails 1.1.6

How people organize test fixtures?
Do they use folder based fixture as we do?
If people use folder based fixture then is any one facing problem?
Jeff E. (Guest)
on 2009-02-17 02:21
(Received via mailing list)
I don't use fixtures.  I use Factory Girl:
http://github.com/thoughtbot/factory_girl/tree/master


On Feb 15, 10:52 pm, Ashrafuz Z. <removed_email_address@domain.invalid>
Ashrafuz Z. (Guest)
on 2009-02-17 05:12
Jeff Emminger wrote:
> I don't use fixtures.  I use Factory Girl:
> http://github.com/thoughtbot/factory_girl/tree/master
>
>
> On Feb 15, 10:52�pm, Ashrafuz Z. <removed_email_address@domain.invalid>

Hi Jeff,
I read about factory_girl and got interested.
Have you used this in large project?
This topic is locked and can not be replied to.