Agile Web Development with Rails, Edition 4
11.6 Iteration F6: Testing AJAX changes
11.4 Iteration F4: Hide an Empty Cart
11.5 Iteration F5: Making Images Clickable
Review our current storefront markup
edit app/views/store/index.html.erb
<% if notice %>
<p id="notice"><%= notice %></p>
<% end %>
<h1>Your Pragmatic Catalog</h1>
<% @products.each do |product| %>
<div class="entry">
<%= image_tag(product.image_url) %>
<h3><%= product.title %></h3>
<p><%= sanitize(product.description) %></p>
<div class="price_line">
<span class="price"><%= number_to_currency(product.price) %></span>
<%= button_to 'Add to Cart', line_items_path(product_id: product),
remote: true %>
</div>
</div>
<% end %>
Associate image clicks with submit button clicks
edit app/assets/javascripts/store.js.coffee
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
$(document).on "page:change", ->
$('.store .entry > img').click ->
$(this).parent().find(':submit').click()
The page looks no different
get /
Pragmatic Bookshelf
Your Cart
1×
CoffeeScript
$36.00
Total
$36.00
Your Pragmatic Catalog
CoffeeScript
CoffeeScript is JavaScript done right. It provides all of JavaScript's
functionality wrapped in a cleaner, more succinct syntax. In the first
book on this exciting new language, CoffeeScript guru Trevor Burnham
shows you how to hold onto all the power and flexibility of JavaScript
while writing clearer, cleaner, and safer code.
Programming Ruby 1.9
Ruby is the fastest growing and most exciting dynamic language
out there. If you need to get working programs delivered fast,
you should add Ruby to your toolbox.
Rails Test Prescriptions
Rails Test Prescriptions is a comprehensive guide to testing
Rails applications, covering Test-Driven Development from both a
theoretical perspective (why to test) and from a practical perspective
(how to test effectively). It covers the core Rails testing tools and
procedures for Rails 2 and Rails 3, and introduces popular add-ons,
including Cucumber, Shoulda, Machinist, Mocha, and Rcov.
Run tests... oops.
rake test
Run options:
# Running tests:
.......
Finished tests in 0.465719s, 15.0305 tests/s, 60.1221 assertions/s.
7 tests, 28 assertions, 0 failures, 0 errors, 0 skips
ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
Run options:
# Running tests:
...E...F.EEEE....EEEE..
Finished tests in 1.147083s, 20.0509 tests/s, 22.6662 assertions/s.
1) Failure:
test_should_create_line_item(LineItemsControllerTest) [/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/line_items_controller_test.rb:28]:
Expected response to be a redirect to <http://test.host/carts/980190963> but was a redirect to <http://test.host/>
2) Error:
test_should_show_line_item(LineItemsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/line_items_controller.rb:21:in `show'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__1504522146114861165__process_action__806164380443698955__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/line_items_controller_test.rb:34:in `block in <class:LineItemsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__2998082133965909036__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
3) Error:
test_should_get_edit(LineItemsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__1504522146114861165__process_action__382806602331064132__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/line_items_controller_test.rb:39:in `block in <class:LineItemsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__2998082133965909036__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
4) Error:
test_should_get_index(LineItemsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/line_items_controller.rb:10:in `index'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__1504522146114861165__process_action__852621053617674441__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/line_items_controller_test.rb:9:in `block in <class:LineItemsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__2998082133965909036__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
5) Error:
test_should_get_new(LineItemsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/line_items_controller.rb:32:in `new'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__1504522146114861165__process_action__945465514530650044__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/line_items_controller_test.rb:15:in `block in <class:LineItemsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__2998082133965909036__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
6) Error:
test_should_get_index(CartsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/carts_controller.rb:10:in `index'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__3737312409804138831__process_action__852621053617674441__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/carts_controller_test.rb:9:in `block in <class:CartsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__3203556737266396809__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
7) Error:
test_should_get_edit(ProductsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__3085689513822134730__process_action__382806602331064132__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/products_controller_test.rb:44:in `block in <class:ProductsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__168053788998988075__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
8) Error:
test_should_get_index(ProductsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/products_controller.rb:7:in `index'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__3085689513822134730__process_action__852621053617674441__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/products_controller_test.rb:18:in `block in <class:ProductsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__168053788998988075__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
9) Error:
test_should_get_new(ProductsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/products_controller.rb:29:in `new'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__3085689513822134730__process_action__945465514530650044__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/products_controller_test.rb:24:in `block in <class:ProductsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__168053788998988075__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
10) Error:
test_should_show_product(ProductsControllerTest):
ActionView::Template::Error: undefined method `line_items' for nil:NilClass
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/views/layouts/application.html.erb:21:in `_app_views_layouts_application_html_erb___4197082747767316542_33650660'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:145:in `block in render'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_view/template.rb:143:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:59:in `render_with_layout'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/rubys/git/rails/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
/home/rubys/git/awdwr/edition4/work-200-32/depot/app/controllers/products_controller.rb:18:in `show'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__3085689513822134730__process_action__806164380443698955__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:121:in `process'
/home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:475:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:49:in `process'
/home/rubys/git/rails/actionpack/lib/action_controller/test_case.rb:392:in `get'
/home/rubys/git/awdwr/edition4/work-200-32/depot/test/functional/products_controller_test.rb:39:in `block in <class:ProductsControllerTest>'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1301:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:17:in `run'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:469:in `_run__168053788998988075__setup__2620921549600415651__callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/rubys/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:919:in `block in _run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `map'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:912:in `_run_suite'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:657:in `block in _run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:655:in `_run_suites'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:867:in `_run_anything'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1060:in `run_tests'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1047:in `block in _run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `each'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1046:in `_run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:21:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:774:in `run'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
/home/rubys/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
23 tests, 26 assertions, 1 failures, 9 errors, 0 skips
ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
Errors running test:functionals! #<RuntimeError: Command failed with status (10): [ruby -I"lib:test" -I"/home/rubys/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.3/lib" "/home/rubys/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.3/lib/rake/rake_test_loader.rb" "test/functional/**/*_test.rb" ]>
11.6 Iteration F6: Testing AJAX changes
11.4 Iteration F4: Hide an Empty Cart