After [3690]
http://dev.rubyonrails.org/changeset/3690
rake db::fixtures::load fails.
$ rake db:fixtures:load --trace
** Invoke db:fixtures:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:fixtures:load
rake aborted!
wrong number of arguments (2 for 3)
config/../vendor/rails/railties/lib/tasks/databases.rake:14:in
`create_fixtures''
config/../vendor/rails/railties/lib/tasks/databases.rake:14
config/../vendor/rails/railties/lib/tasks/databases.rake:13
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in
`execute''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in
`execute''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:in
`invoke''
/opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:in
`invoke''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:in `run''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:in `run''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7
/opt/local/bin/rake:18
Could we make the new, third argument to Fixture.create_fixtures
optional and default to {} for backwards compatibility?
/Lars
On Feb 23, 2006, at 3:40 AM, Kevin Clark wrote:
> Fixture accessor methods don''t work with set_table_name because
the
> class name can''t be inferred from the table name. I''ve
created a patch
> which fixes this (http://dev.rubyonrails.org/ticket/3935).
>
> Please take a look and throw suggestions my way.
>
> Here''s the current usage for a model Joke which uses a table name
of
> funny_jokes:
>
> class SetTableNameFixturesTest < Test::Unit::TestCase
> set_fixture_class :funny_jokes => ''Joke''
> fixtures :funny_jokes
>
> def test_table_method
> assert_kind_of Joke, funny_jokes(:a_joke)
> end
> end
>
> Kev
> _______________________________________________
> Rails-core mailing list
> Rails-core@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-core