Displaying 14 results from an estimated 14 matches for "insert_fixture".
Did you mean:
insert_fixtures
2005 Nov 26
4
activerecord rake test_mysql
...`name`, `id`)
VALUES (''Active Record'', 1)
./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in
`log''
./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:in
`execute''
./test/../lib/active_record/fixtures.rb:284:in `insert_fixtures''
./test/../lib/active_record/fixtures.rb:283:in `each''
./test/../lib/active_record/fixtures.rb:283:in `insert_fixtures''
./test/../lib/active_record/fixtures.rb:253:in `create_fixtures''
./test/../lib/active_record/fixtures.rb:253:in `each''...
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
...ract_adapter.rb:156:in `log''
./test/../lib/active_record/connection_adapters/postgresql_adapter.rb:407:in `execute_without_counting''
./test/abstract_unit.rb:71:in `execute''
./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:140:in `insert_fixture''
./test/../lib/active_record/fixtures.rb:634:in `insert_fixtures''
./test/../lib/active_record/fixtures.rb:571:in `each''
./test/../lib/active_record/fixtures.rb:571:in `insert_fixtures''
./test/../lib/active_record/fixtures.rb:519:in `create_fixture...
2011 Jul 25
4
Rails 3 test database issues
...:in `log''
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/
active_record/con
nection_adapters/mysql_adapter.rb:289:in `execute''
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/
active_record/con
nection_adapters/abstract/database_statements.rb:239:in
`insert_fixture''
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/
active_record/fix
tures.rb:646:in `block in insert_fixtures''
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/
active_record/fix
tures.rb:582:in `each''
C:/Ruby192/lib/ruby/gems/1.9.1/gems/a...
2006 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
...connection_adapters/abstract_adapter.rb:120:in
`log''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:185:in
`execute''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:288:in
`insert_fixtures''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:287:in
`insert_fixtures''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:257:in
`create_fixtures''
/usr/local/lib/ruby/gems/1.8/gems/acti...
2009 Feb 02
2
looking for help with NoMethodError: undefined method `key?' for #<String:0x4795488>
...I get many errors that look like
this:
---------------------------------
1) Error:
test_the_truth(EntityTest):
NoMethodError: undefined method `key?'' for #<String:0x4795488>
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/fixtures.rb:584:in `insert_fixtures''
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/fixtures.rb:583:in `each''
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/fixtures.rb:583:in `insert_fixtures''
C:/InstantRails/ruby/lib/ruby/g...
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
...tive_record/connection
_adapters/abstract_adapter.rb:128:in `log''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection
_adapters/mysql_adapter.rb:243:in `execute''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.r
b:290:in `insert_fixtures''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.r
b:289:in `each''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.r
b:289:in `insert_fixtures''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_re...
2006 Mar 01
1
maddening intermittent failures in unit tests with "working" code
...m http://rails.techno-weenie.net/tip/2005/11/20/log_within_tests
def logger
RAILS_DEFAULT_LOGGER
end
end
# from
http://wiki.rubyonrails.com/rails/pages/DisableForeignKeyChecksUnderMySql
class Fixtures
alias :original_delete_existing_fixtures :delete_existing_fixtures
alias :original_insert_fixtures :insert_fixtures
def delete_existing_fixtures
@connection.update "SET FOREIGN_KEY_CHECKS = 0", ''Fixtures deactivate
foreign key checks.'';
original_delete_existing_fixtures
@connection.update "SET FOREIGN_KEY_CHECKS = 1", ''...
2006 Nov 07
4
Unknown column 'id' in 'field list
...ecord/connection_adapters/abstract_adapter.rb:120:in
`log''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:184:in
`execute''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/fixtures.rb:288:in
`insert_fixtures''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/fixtures.rb:287:in
`each''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/fixtures.rb:287:in
`insert_fixtures''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/...
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi,
My application spans 2 (or more) databases for some very specific
reasons... My models are working fine, even dynamically establishing
connections as needed at runtime, and spanning relationships across the
databases (which really impressed me). The problem is, I can''t seem to
force Units for these models (that use a secondary db) to load their
fixtures into and use the
2007 Apr 01
7
database.yml: encoding: utf8 does not work
Hi all
According to the Agile 2nd Ed book I added the line encoding: utf8 to my
database.yml connections.
But now when running rake I get plenty of errors:
Character set ''utf-8'' is not a compiled character set and is not
specified in the ''/usr/local/mysql/share/mysql/charsets/Index'' file
What''s wrong here?
I checked this Index file, but it seems to
2006 Jul 27
1
importing data with migration for habtm
...o model, so I cant use that code:
f = Fixtures.new(Category.connection, # a database connection
"categories", # table name
Category, # model class
File.join(File.dirname(__FILE__),
"dev_data/categories"))
f.insert_fixtures
How can I do this?
--
Posted via http://www.ruby-forum.com/.
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works
fine running scripts/spec, but when I run rake spec instead, I get:
ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM
service but no IM name should be invalid''
Mysql::Error: Cannot delete or update a parent row: a foreign key
constraint fails
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
2006 Feb 01
5
Sybase ctlib Adapter
Hi,
I''ve been trying to update Will Sobel''s sybase-ctlib adapter to pass
unit tests on Rails 1.0. It''s been a slow, sloggy process for me so
far, as I''ve been learning Ruby, Rails, and Sybase administration all
in one go. (c: It''s been a saving grace to have a good starting
point (thanks Will!).
http://dev.rubyonrails.org/ticket/2030