Here is my products.yml
version_control_book:
id: 1
title: Pragmatic Version Control
description: How to use version control
image_url: /images/sk_svn_small.jpg
price: 29.95
date_available: 2005-01-26 00:00:00
automation_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
assert_equal nil, @version_control_book
assert_equal nil, @automation_book
end
end
And here is what I am getting from product_test.rb,
[[email protected] depot]$ ruby test/unit/product_test.rb
Loaded suite test/unit/product_test
Started
.
Finished in 0.143878 seconds.
1 tests, 3 assertions, 0 failures, 0 errors
I was expecting to see 1 failure and 3 errors. Am I doing something
wrong?
Mohammad