Hey all -

I'm brand new to both Ruby & Rails coming from a long history of C-
style syntax. I'm trying to assimilate a lot of things at the same
time, so I'm bumping into all kinds of issues. Many I can track down
via Google, but I'm stuck on this one.

I had a File model that I generated. A few hours later I learned that
"file" is a reserved word so I created a db migration to change the
table name to "binaries" and made all of the other file changes I
could think of. I must have missed at least one (I renamed and
modified models/file.rb and test/unit/file_test.rb). For this model,
it's _only_ a model (no controller, view, helper, etc.). There is no
content beyond the default in the unit test so far, but it's still
failing:

require 'test_helper'

class BinaryTest < ActiveSupport::TestCase
  def test_should_be_valid
    assert Binary.new.valid?
  end
end

Clearly I've missed something b/c my unit test output is:

$ ruby unit/binary_test.rb
Loaded suite unit/binary_test
Started
E
Finished in 0.00438 seconds.

  1) Error:
test_should_be_valid(BinaryTest):
ActiveRecord::StatementInvalid: Mysql::Error: Table
'rphoto_test.files' doesn't exist: DELETE FROM `files`


1 tests, 0 assertions, 0 failures, 1 errors

I did update my test db using rake db:test:load. Can someone point me
in the right direction?

Much appreciated.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to