search for: date_available_before_type_cast

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

2005 Dec 31
2
Test Unit Problem
...assert_equal "http://.../pc_image.jpg", @product.image_url puts "class of @product.price = #{@product.price.class}" puts "value of @product.price = #{@product.price}" assert_equal 15000.00, @product.price assert_equal "2005-12-31 06:53:00", @product.date_available_before_type_cast end end When I run ruby test/unit/product_test.rb I receive the following results: Loaded suite test/unit/product_test Started class of @product.price = Float value of @product.price = 15000.0 F Finished in 5.485 seconds. 1) Failure: test_fixtures(ProductTest) [test/unit/product_test.rb:18...
2006 Apr 21
2
NoMethodError with test_read_with_hash
...book["title"], @product.title assert_equal vc_book["description"], @product.description assert_equal vc_book["image_url"], @product.price assert_equal vc_book["price"], @product.price assert_equal vc_book["date_available"], @product.date_available_before_type_cast end Is there anything I need to tweak in the code to avoid seeing the error again? -- Posted via http://www.ruby-forum.com/.
2006 Mar 11
1
unit testing date columns
...irst tests, following along the tute in Agile Web Dev with rails book. I have a table with a created_at timestamp column in mysql. My test always fails when testing the result of the created_at column. The book says my test should look like: assert_equal "2006-03-09 21:01:37", @thing.date_available_before_type_cast but when I run my test I get 1 error returned: "undefined method date_available_before_type_cast" what am I doing wrong? -- Posted via http://www.ruby-forum.com/.
2006 Jul 06
0
problema con i test automatizzati
...    assert_equal "Come utilizzare il controllo di versione", @product.descrizione         assert_equal 29.95, @product.prezzo         assert_equal "http://www.alfonsomartone.itb.it/yescna.jpg", @product.image_url         assert_equal "2005-01-26 00:00:00", @product.date_available_before_type_cast   end     def test_update         assert_equal 29.95, @product.prezzo         @product.prezzo = 99.99         assert @product.save, @product.errors.full_messages.join("; ")         @product.reload         assert_equal 99.99, @product.prezzo     end     def test_destroy         @...
2006 May 05
7
Testing model: test becomes dependent on previous test
...tic Programmer", @product.title assert_equal "Best book for the programmer", @product.description assert_equal "http://localhost:3000/images/pp.jpg", @product.image_url assert_equal 29.95, @product.price assert_equal "2006-05-01 00:00:00", @product.date_available_before_type_cast end def test_update assert_equal 29.95, @product.price @product.price = 99.95 assert @product.save, @product.errors.full_messages.join("; ") @product.reload assert_equal 99.95, @product.price end def test_update2 assert_equal 29.95, @product.price @pr...