search for: product_test

Displaying 20 results from an estimated 26 matches for "product_test".

2006 Mar 04
2
unittest, not loading yml data
..._book: id: 2 title: Pragmatic Project Automation description: How to automate your project image_url: /images/sk_auto_small.jpg price: 29.95 date_available: 2004-07-01 00:00:00 and I was trying to use @products and @version_control_book in my product_test.rb script here is my test_product.rb require File.dirname(__FILE__) + ''/../test_helper'' class ProductTest < Test::Unit::TestCase fixtures :products def setup @product = Product.find(1) end def test_load_yml assert_equal nil, @products a...
2005 Dec 31
2
Test Unit Problem
...ails that I can''t fathom. I have a products.yml file which holds the following test fixture for the products table: dell_pc: id: 1 title: Dell PC description: Dell PC image_url: http://.../pc_image.jpg price: 15000.00 date_available: 2005-12-31 06:53:00 I also have the following product_test.rb file to test the fixture above: require File.dirname(__FILE__) + ''/../test_helper'' class ProductTest < Test::Unit::TestCase fixtures :products def setup @product = Product.find(1) end def test_fixtures assert_kind_of Product, @product assert_equal 1, @...
2006 Mar 09
4
Strange Unit Testing error - newbie question
...;m getting some strange errors. I''m up to page 141 in the Agile book, and attempting to run the test program containing the method test_read_with_hash. The previous tests work properly, but I don''t seem to be able to refer to the fixtures through its variable. The file "product_test.rb" contains the line "fixtures :products", which says it should set up the variable @fixtures through which I can refer to my fixtures. My "products.yml" fixture file is exactly as downloaded from the Agile Web Dev site, I''ve checked it for syntax and spelling...
2006 Apr 21
2
NoMethodError with test_read_with_hash
While running the product_test.rb test fixture in the Agile Web Development book (p. 148), but when I run ruby test/unit/product_test.rb, I get the following error: 1) Error: test_read_with_hash(ProductTest): NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Arr...
2006 Jul 06
0
problema con i test automatizzati
...lito, sto andando avanti a piccoli passi nel creare l''applicazione depot del libro "Sviluppare Applicazioni Web con Rails". Ora mi trovo nella fase di creazione dei test automatizzati. Ma c''è una cosa che proprio non capisco: Ho la seguente classe in ~/depot/test/unit/product_test.rb require File.dirname(__FILE__) + ''/../test_helper'' class ProductTest &lt; Test::Unit::TestCase   fixtures :products     def setup         @product = Product.find(1)     end   # Replace this with your real tests.   def test_create     assert_kind_of Product, @produc...
2006 Apr 20
8
generate scaffold not generating views
...exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml Any suggestions? Thanks, jb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/9c155c1f/attachment.html
2006 Jan 28
10
Rails scaffolding - cannot get access to MySQL
...duct Admin exists app/controllers/ exists app/helpers/ create app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/product.rb create test/unit/product_test.rb create test/fixtures/products.yml #28000Access denied for user ''bo''@''localhost'' (using password: NO) My YML file for my development project: development: adapter: mysql database: Depot_development host: localhost username: bo password: I...
2005 Dec 22
13
in-memory SQLite for testing
I am following the rails book, and arrived to the section about testing. The test database is configured as: test: adapter: sqlite3 database: ":memory:" and I get this error with the simple product test: % ruby test/unit/product_test.rb Loaded suite test/unit/product_test Started E/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/ errors.rb:94:in `check'': cannot rollback - no transaction is active (SQLite3::SQLException) from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ lib/sqlite3/...
2005 Dec 23
6
Agile book - test error
...question is: 1) Error: test_add_to_cart(StoreControllerTest): RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id test/functional/store_controller_test.rb:26:in `test_add_to_cart'' Ran the command: "ruby test/unit/product_test.rb" Checked the database table and the fixture. The are loaded. Rests to see I''m clueless. Thanx for any brain timecycles spent on this. Regards, Gerard.
2006 May 05
7
Testing model: test becomes dependent on previous test
Im having trouble with Testing models. im following the tutorials in the book Agile Web Development with Rails. if i execute the code product_test.rb, i get this error: ============================================================ 1) Failure: test_update2(ProductTest) [test/unit/product_test.rb:30]: <29.95> expected but was <99.95>. 3 tests, 11 assertions, 1 failures, 0 errors ===================================================...
2006 Feb 21
0
DB not being repopulated prior to Unit test execution
I''m working my way through the AWD book and have just started the testing chapter. The first two unit tests run as expected. When I add the test for the ''destroy'' function to product_test.rb, however, I''m getting a failure I don''t understand. The error I''m getting says that in the setup method for test_update, it "couldn''t find Product with ID=1". When I run product_test.rb without the test_destroy test case, the other two methods (t...
2006 Apr 20
1
generate scaffold not generating views
...exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml Any suggestions? Thanks, jb _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
2006 Apr 04
6
connecting to mysql on OS X 10.4
...exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml Access denied for user: ''xxxxxxx@localhost'' (Using password: YES) the use in question exists, and Lasso (http://omnipilot.com) can get to the databases just fine, as can i in cocoamysql -- so i *know* the user/password combo wo...
2005 Dec 23
2
SQLite in-memory
...oes 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 - no transaction is active (SQLite3::SQ...
2006 Apr 13
1
Setting up Testing model, getting an error
I setup a testing model in my Depot web app from the Agile Web Development with Rails book and came up with the following errors: Loaded suite test/unit/product_test Started EE Finished in 0.050279 seconds. 1) Error: test_create(ProductTest): Errno::ENOENT: No such file or directory - /Users/Mike/Sites/depot/config/../test/fixtures/categories /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:327:in `open''...
2006 Mar 28
2
Problem with generating a scaffold with an Oracle DB
...duct Admin exists app/controllers/ exists app/helpers/ create app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/product.rb create test/unit/product_test.rb create test/fixtures/products.yml ORA-12537: TNS:connection closed What is the problem here, because according to my tutorial in the fine book "Agile webdevelopment with Rails" it should create view components. Does anyone see the problem here? Thanks in advance! -Tom --...
2006 Apr 03
18
newbie generate scaffold
Hi Guys First time on the list and pretty new to the rails way of doing things, yup I know sorry.. another newbie! anyway, apologies out of the way, this is the problem I am having... I have purchased the "Agile Development with Rails" book and have just started running through the ''Depot'' demo application. I have got to page 57... I have my project files all
2006 Mar 30
13
Trying Agile book, found problem
...y gives me exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml I understand that a similar problem was reported and fixed here http://dev.rubyonrails.org/ticket/2537 But my problem isn''t the same as his. He''s only missing one thing - I''m missing many things. I''m using Locomot...
2006 Feb 26
17
please help: having problem with the scaffold commad, mysql.
...error: koloa@ubuntu:/var/www/depot$ ruby script/generate scaffold Product Admin exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml No such file or directory - /tmp/mysql.sock //////////////////////////////////////////////////////// now i have been searching the forums and google but getting even more confused. what is the difference between mysql.sock and mysqld.sock? is this file cr...
2006 Feb 20
18
Win XP/ Mysql Problem
...message. exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb identical test/fixtures/products.yml error Before updating scaffolding from new DB schema, try creating a tab le for your model (Product) For the life of me I cannot figure out the problem. I''ve reinstalled a million times. My config file is as followed. development:...