Displaying 1 result from an estimated 1 matches for "rails_book".
2006 Jun 25
1
Unit Testing failure
...test.rb:22]:
<4690> expected but was
<3579>.
2 tests, 3 assertions, 1 failures, 0 errors
require File.dirname(__FILE__) + ''/../test_helper''
class CartTest < Test::Unit::TestCase
fixtures :products
def setup
@cart = Cart.new
@rails = products(:rails_book)
@ruby = products(:ruby_book)
end
def test_add_unique_products
@cart.add_product @rails
@cart.add_product @ruby
assert_equal 2, @cart.items.size
assert_equal @rails.price + @ruby.price, @cart.total_price
end
def test_add_duplicate_product
@cart.add_pro...