Displaying 6 results from an estimated 6 matches for "order_test".
Did you mean:
order_cost
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) [test/unit/order_test.rb:17]:
<"Wed Feb 15 12:56:26 GMT 2006"> expected but was
<Wed Feb 15 12:56:26 GMT 2006>.
1 tests, 6 assertions, 1 failures, 0 errors
My fixture populates the mySQL order tabl...
2006 Jun 02
0
Problem updating child row from parent model
...s, 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
"Add", "Update" and "Destroy" for my model"Order".
My problem is that on the "Update" I try to update a quantity which is a
field of my table "line_items" which is a child of my table "orders&q...
2007 Sep 02
4
unit test failing
.../lib/active_record/
transactions.rb:95:in `transaction''
/var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:121:in `transaction
''
/var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:133:in `save!''
./test/unit/order_test.rb:13:in `test_delete''
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To u...
2005 Dec 30
1
Problems with Testing (Depot) demo app in Agile Rails book
...nutes
7. Unfortunately, ALL tests (including previously working Unit and
Functional tests) now failing uniformly (and with voluminous messages) -
see example below
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\rails\depot>ruby test/unit/order_test.rb
Loaded suite test/unit/order_test
Started
EE
Finished in 0.109 seconds.
1) Error:
test_truth(OrderTest):
ActiveRecord::StatementInvalid: Mysql::Error: Lost connection to MySQL
server during query: DELETE FROM orders
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/con...
2006 Feb 28
6
Activerecord equivalent of the SQL "SUM()" function.
Search doesn''t seem to be working, so forgive me if I''m covering old
ground here, but I''m having a difficult time figuring out how to
implement a "SUM()" function using Active record. Obviously, I could
just create a query, but I''d rather make it part of my active record
object.
Basically I have an object called "Report <
2005 Dec 23
2
SQLite in-memory
...te ":memory:" working? How does it grab the schema?
-- fxn
% rake test_units
(in /Users/fxn/study/rails/depot)
/usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/
rake-0.6.2/lib/rake/rake_test_loader.rb" "test/unit/
line_item_test.rb" "test/unit/order_test.rb" "test/unit/
product_test.rb" "test/unit/user_test.rb"
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/
rake_test_loader
Started
FFE/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/
errors.rb:94:in `check'': cannot rollback -...