do have put fixture records model in same file, named after model? selectively load on records depending on test case, since existing of other data changes app's behaviour
you have place fixture records in same file - fixtures placed before running tests, , designed in database every test run. if want add test-specific fixtures, you're better off using factories, provide localized, context-specific ways of creating , mocking objects tests use. can choose have them instantiated, or saved database - providing flexibility.
the popular factory rails factory girl - should give try!
Comments
Post a Comment