small medium large xlarge

07 Nov 2010, 20:15
Steve Mills (4 posts)

I’m in the chapter “Iteration B2: Unit Testing of Models”. Although the application so far works fine, the test in this chapter fails “NoMethodError: undefined method `products’”.

It would appear that “products” here refers to the data being established through the fixtures. I cannot see how to get past this problem. I am running this on Windows 7 and have tried it both from within the RubyMine IDE and from the command line and the result is exactly the same.

Any help would be much appreciated.

I am very interested in the TDD but am forced to skip this part of the book and continue building the application.

P.S. I also found that I needed to set ‘self.use_transactional_fixtures = false’ otherwise the test loaded up the Products table and then promptly rolled it back before running the tests.

You must be logged in to comment