similar to: Problems with Testing (Depot) demo app in Agile Rails book

Displaying 20 results from an estimated 6000 matches similar to: "Problems with Testing (Depot) demo app in Agile Rails book"

2005 Nov 26
4
activerecord rake test_mysql
Hi (I''m resubmitting this because First question: This is the rails dev list, correct? I''d like to submit a patch and am following the steps on this page: http://dev.rubyonrails.org/ Here''s what I did (using mysql 5.0.15-nt): created 2 databases: activerecord_unittest activerecord_unittest2 created 1 user: rails (giving all priveleges to both databases) ran
2006 Nov 07
4
Unknown column 'id' in 'field list
Hello, I''m trying to write a unit test for model that doesn''t have an ''id'' field. I created the model''s table with the following migration, making sure the primary key was set. class CreateActiveUserMetrics < ActiveRecord::Migration def self.up create_table :active_user_metrics, {:id => false,
2009 Feb 02
2
looking for help with NoMethodError: undefined method `key?' for #<String:0x4795488>
Hi all, Any help with this would be appreciated. I''m using instant rails, updated to 2.2.2, on Windows XP. I''ve created my DB and scaffolded a few things and put some fixtures into place, and when I run the tests I get many errors that look like this: --------------------------------- 1) Error: test_the_truth(EntityTest): NoMethodError: undefined method `key?'' for
2006 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
I''m having (to me) a strange problem with errors when running my tests with rake as opposed to using ruby. If I do rake test:units I get this error for several tests, but not all: 13) Error: test_player_has_game_statistics_for_season(PlayerSeasonTest): ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry ''22'' for key 1: INSERT INTO positions (`name`, `id`,
2006 Sep 05
0
rake craziness with Migrate as a dependency
Hi everyone, For one of our projects we have a need to deploy and maintain a demo. As a result I''ve attempted to setup a set of rake tasks for the job. My goal is have one rake task called "deploy_demo" which purges the database, migrates to the current schema, and loads the db from a set of fixture files in a specified location. I''ve written two new tasks the perform
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed. CHANGES ------- Revision 8649 committed by gbuesing on 2008-01-16 20:07:10 Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002 M /trunk/activesupport/CHANGELOG M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb M /trunk/activesupport/test/core_ext/date_time_ext_test.rb TEST FAILURES AND
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
I''m resending this with additional information, as I''ve had no response. I''ve been trying to use the fixture_references plugin, and I seem to be getting lots of: 1) Error: test_truth(DeviceTest): ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ''description_id'' doesn ''t have a default value: INSERT INTO devices (`id`) VALUES (2)
2006 Jun 02
0
Problem updating child row from parent model
I developped a web site with Ruby on Rails, but I get a problem during the testing. I have a parent table called "orders" and a child table called "line_items". I created some data for the test in the files "test/fixtures/orders.yml" and "test/fixtures/line_items.yml". In the file "test/unit/order_test.rb" I wrote some code to test the
2007 Sep 02
4
unit test failing
I have unit tests set up with "self.use_transactional_fixtures = true", so each test should roll back. Run individually, all my tests succeed. But running "rake test:units", I get the below error in 5 test cases. I''m not sure how to solve this since I''m not sure how to debug tasks run thru rake. Any ideas are appreciated. 1) Error: test_delete(OrderTest):
2006 Feb 15
2
First unit test fails
I''ve just started working through ''Agile'' chapter 12 ''Testing''. I''ve followed the steps carefully, setting up a fixture and unit test to check the creation of an order. When I run the test I get the following: Loaded suite test/unit/order_test Started F Finished in 0.108008 seconds. 1) Failure: test_create(OrderTest)
2006 May 22
1
Agile Web Dev unit test fails with fixture instance variable
I''m following Agile Edition 1. On page 148 it suggests using instance variables named after the fixture, for example: assert_equal @version_control_book.id, @product.id When I introduce this type of instance variable into my test, I get the following error: 1) Error: test_not_owner(GroupTest): RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the
2006 Jan 18
15
Anyone got Globalize working???
Hi all In another thread I complain about an error I get after trying to get Globalize working. http://www.ruby-forum.com/topic/51988#new Now I want to ask you, if anybody of you has ever got Globalize working? I have done exactly what''s written in the (absolutely much too short) tutorial of its wiki... http://globalize.diluvia.net/wiki ...and I''m very frustrated that no
2006 Apr 30
3
MySQL connection problems on Dreamhost
To all fellow Dreamhosters out there... Sometimes my app mysteriously loses its connection to the database, resulting in a big ugly "Application Error (Rails)" page. Usually refreshing the page makes it go away, but not today. :-( In production.log I see this: MysqlError (Lost connection to MySQL server during query): Any idea why this happens? It''s rather intermittent
2006 Jan 21
2
problems in moving an application database from a local to a remote mysql server
hi. i''ve an application which is using a local mysql server (on localhost). i then moved the mysql server to another machine (remote host) and changed accordingly the "database.yml" file. when i launch webrick from the "localhost", it can connect to the database but as soon as i call a controller of the application (for example
2006 May 19
3
new to rails; problem with testing section in Agile book
Hello, I should give the expected disclaimer that I am brand new to rails and am going through the Agile web development with Rails book right now. I am in the testing section and I can''t get past an error. this is my cart_test.rb test file: require File.dirname(__FILE__) + ''/../test_helper'' class CartTest < Test::Unit::TestCase fixtures :products def setup
2006 Jan 13
1
ActiveRecord: using with multiple threads/DB connections
Hi, I''m totally new to Ruby and Rails and I''m trying to set up a prototype web site. Unfortunately, I''m having problems with ActiveRecord using multiple threads. What I want to do is fairly simple. I have a Controller that receives and saves data from the web in the DB, but once that''s done I want to process this data in another thread and then save the
2006 Jan 15
0
OS X Rails - Nuby
OK, I''m diving into new things - a .net programmer and windows user trying to develop in Rails on my Mac. Initial setup was easy, and I had things working and was thrilled with myself. Then I shut down. Next time I booted up, mysql was acting all kinds of funny. I finally got that working again (I *think* it mostly had to do with me not having the right path, I unfortunately
2006 Feb 15
0
MySql adapter error
Most likely due to something I misconfigured and/or broke when trying to get the new polymorphic acts_as_taggable to work...In short, after installing that gem and then trying to run gem install mysql on my windows server, I''ve been getting this weird error on every page I try to hit. If anyone give give me any insight into how I messed this up or how to fix, it would be much
2006 Feb 21
0
Rails edge breaks my app
I set my app on the Rails edge yesterday via rake freeze_edge and that broke my app. If I take the ..\vendor\rails folder out and restart the server (webrick), it works fine. I don''t get any errors. But if I re-add the ..\vendor\rails folder I get errors when accessing any views that have pagination. Is this a known issue or problem? This is the error: ActiveRecord::StatementInvalid in
2006 Jan 04
0
Mysql::Error: MySQL server has gone away
Hello, Does anyone see the following error? Is it possible that it has something to do with the connection maintained by active record timing out? /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract_adapter.rb:88:in `log'': Mysql::Error: MySQL server has gone away: SELECT * FROM toys WHERE (toys.id = 28) LIMIT 1