Agile Web Development with Rails, Edition 4

Agile Web Development with Rails, Edition 4

10.1 Iteration E1: Creating a Smarter Cart 9.3 Iteration D3: Adding a button

9.4 Playtime

\d tests, 2\d assertions, 0 failures, 0 errors.

Traceback:
  /home/rubys/git/awdwr/edition4/checkdepot.rb:101:in `block in <class:DepotTest>'

Once again, get the tests working, and add tests for the smarter cart.

See that the tests fail.

rake test
/home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: test/unit/**/*_test.rb (ArgumentError)
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:21:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:606:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'
/home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: test/functional/**/*_test.rb (ArgumentError)
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:21:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:606:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'
Errors running test:units, test:functionals!

Update parameters passed as well as expected target of redirect

edit test/functional/line_items_controller_test.rb
  test "should create line_item" do
    assert_difference('LineItem.count') do
      post :create, :product_id => products(:ruby).id
    end
 
    assert_redirected_to cart_path(assigns(:line_item).cart)
  end
rake test
/home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: test/unit/**/*_test.rb (ArgumentError)
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:21:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:606:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'
/home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: test/functional/**/*_test.rb (ArgumentError)
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:21:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:606:in `run'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
	from /home/rubys/.rvm/rubies/ruby-1.9.3-r33476/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'
Errors running test:units, test:functionals!

10.1 Iteration E1: Creating a Smarter Cart 9.3 Iteration D3: Adding a button