search for: setup_fixtures

Displaying 5 results from an estimated 5 matches for "setup_fixtures".

2010 May 26
3
Plugin test fixtures
...ut why I couldn''t get fixtures to work in a plugin test. I was including ActiveRecord::TestFixtures into ActiveSupport::TestCase and trying to get fixtures to automatically reload for every test like regular Rails tests. The problem was in the first line of ActiveRecord::TestFixtures.setup_fixtures: return unless defined?(ActiveRecord) && !ActiveRecord::Base.configurations.blank? This causes setup_fixtures to silently return without doing anything if you call ActiveRecord::Base.establish_connection directly without setting ActiveRecord::Base.configurations. The method doesn'...
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
...`create_fixtures'' ./test/../lib/active_record/base.rb:1207:in `silence'' ./test/../lib/active_record/fixtures.rb:507:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:950:in `load_fixtures'' ./test/../lib/active_record/fixtures.rb:925:in `setup_fixtures'' ./test/../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:120:in `send!'' ./test/../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:120:in `run_callbacks'' ./test/../lib/../../activesupport/lib/active_support/te...
2011 Jul 25
4
Rails 3 test database issues
...ecord-3.0.3/lib/ active_record/fix tures.rb:514:in `create_fixtures'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/ active_record/fix tures.rb:973:in `load_fixtures'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/ active_record/fix tures.rb:938:in `setup_fixtures'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/ active_support/c allbacks.rb:414:in `_run_setup_callbacks'' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/ active_support/t esting/setup_and_teardown.rb:34:in `run'' 2 tests, 0 assertions,...
2009 Feb 02
2
looking for help with NoMethodError: undefined method `key?' for #<String:0x4795488>
...ib/ active_record/fixtures.rb:508:in `create_fixtures'' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/ active_record/fixtures.rb:964:in `load_fixtures'' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/ active_record/fixtures.rb:930:in `setup_fixtures'' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/ lib/active_support/callbacks.rb:178:in `send'' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/ lib/active_support/callbacks.rb:178:in `evaluate_method'' C:/InstantRails/ruby/lib/r...
2011 Jul 11
36
has_many and belongs_to association
Hi , I want to test the one below but I got the problem belongs_to :name, :class_name => "Phrase", :foreign_key => "name" in my test context "test"do should have_many :phrases end in language.rb belongs_to :name, :class_name => "Phrase", :foreign_key => "name" error is 1) Failure: test: check has_many and belongs_to