On 6 December 2010 16:11, John Sayeau <[email protected]> wrote: > I am working my way through Agile web development with rails and I'm in > the testing chapter. > when I run the following test(or any other test) > I'm new and not sure where to start looking. > > require 'test_helper' > > class ProductTest < ActiveSupport::TestCase > # Replace this with your real tests. > test "the truth" do > assert true > end > end > > I always get > > ActiveRecord::StatementInvalid: SQLite3::SQLException: table users has > no column named image_url: INSERT INTO "users" ("created_at", > "image_url", "title", "updated_at", "id", "description") VALUES > ('2010-12-06 16:04:02', 'MyString', 'MyString', '2010-12-06 16:04:02', > 298486374, 'MyText')
If the error occurs before it actually starts running the tests and happens whatever test you are running it may be an issue with loading the fixtures into the test database. Have you got fixtures for the users table (probably test/fixtures/users.yml)? Have you got image_url specified in the fixture but not in the database? Once you have worked through the tutorial then I would advise forgetting about fixtures and using Factories instead. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

