14.5 Performance Testing 14.3 Functional Testing of Controllers
</1 tests, \d+ assertions, 0 failures, 0 errors/> expected but was <" exists test/integration/">. Traceback: /home/rubys/git/awdwr/edition3/work-192-23/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb:307:in `assert_select' /home/rubys/git/awdwr/edition3/checkdepot.rb:239:in `block in <class:DepotTest>'
ruby script/generate integration_test user_stories
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Dependency.new w/ a regexp is deprecated.
Dependency.new called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails_generator/lookup.rb:211
NOTE: Gem.cache is deprecated, use Gem::source_index. It will be removed on or after 2011-08-01.
Gem.cache called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails_generator/lookup.rb:212.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:1175.
NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#search called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:119.
NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#search called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:119.
NOTE: Gem.cache is deprecated, use Gem::source_index. It will be removed on or after 2011-08-01.
Gem.cache called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails_generator/lookup.rb:234.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems.rb:1175.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:123.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:124.
exists test/integration/
create test/integration/user_stories_test.rb
edit test/integration/user_stories_test.rb
require 'test_helper'
class UserStoriesTest < ActionController::IntegrationTest
fixtures :products
# A user goes to the index page. They select a product, adding it to their
# cart, and check out, filling in their details on the checkout form. When
# they submit, an order is created containing their information, along with a
# single line item corresponding to the product they added to their cart.
test "buying a product" do
LineItem.delete_all
Order.delete_all
ruby_book = products(:ruby_book)
get "/store/index"
assert_response :success
assert_template "index"
xml_http_request :put, "/store/add_to_cart/#{ruby_book.id}"
assert_response :success
cart = session[:cart]
assert_equal 1, cart.items.size
assert_equal ruby_book, cart.items[0].product
post "/store/checkout"
assert_response :success
assert_template "checkout"
post_via_redirect "/store/save_order",
:order => { :name => "Dave Thomas",
:address => "123 The Street",
:email => "dave@example.com",
:pay_type => "check" }
assert_response :success
assert_template "index"
assert_equal 0, session[:cart].items.size
orders = Order.find(:all)
assert_equal 1, orders.size
order = orders[0]
assert_equal "Dave Thomas", order.name
assert_equal "123 The Street", order.address
assert_equal "dave@example.com", order.email
assert_equal "check", order.pay_type
assert_equal 1, order.line_items.size
line_item = order.line_items[0]
assert_equal ruby_book, line_item.product
end
end
ruby -I test test/integration/user_stories_test.rb
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
Loaded suite test/integration/user_stories_test
Started
E
Finished in 0.059967 seconds.
1) Error:
test_buying_a_product(UserStoriesTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: products: DELETE FROM "products" WHERE 1=1
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `rescue in log'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:204:in `log'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `block in execute'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:418:in `catch_schema_changes'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:265:in `update_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:176:in `update_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:270:in `delete_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:182:in `delete_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:54:in `delete'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `delete_with_query_dirty'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:549:in `delete_existing_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `block (4 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `each'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `block (3 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:510:in `block (2 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:109:in `disable_referential_integrity'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:501:in `block in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/base.rb:1482:in `silence'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:500:in `create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:964:in `load_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:929:in `setup_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `evaluate_method'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `block in run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:23:in `run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/actionpack/lib/action_controller/integration.rb:673:in `run'
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
Test run options: --seed 8242
edit test/integration/dsl_user_stories_test.rb
require 'test_helper'
class DslUserStoriesTest < ActionController::IntegrationTest
fixtures :products
DAVES_DETAILS = {
:name => "Dave Thomas",
:address => "123 The Street",
:email => "dave@example.com",
:pay_type => "check"
}
MIKES_DETAILS = {
:name => "Mike Clark",
:address => "345 The Avenue",
:email => "mike@pragmaticstudio.com",
:pay_type => "cc"
}
def setup
LineItem.delete_all
Order.delete_all
@ruby_book = products(:ruby_book)
@rails_book = products(:rails_book)
end
# A user goes to the store index page. They select a product,
# adding it to their cart. They then check out, filling in
# their details on the checkout form. When they submit,
# an order is created in the database containing
# their information, along with a single line item
# corresponding to the product they added to their cart.
def test_buying_a_product
dave = regular_user
dave.get "/store/index"
dave.is_viewing "index"
dave.buys_a @ruby_book
dave.has_a_cart_containing @ruby_book
dave.checks_out DAVES_DETAILS
dave.is_viewing "index"
check_for_order DAVES_DETAILS, @ruby_book
end
def test_two_people_buying
dave = regular_user
mike = regular_user
dave.buys_a @ruby_book
mike.buys_a @rails_book
dave.has_a_cart_containing @ruby_book
dave.checks_out DAVES_DETAILS
mike.has_a_cart_containing @rails_book
check_for_order DAVES_DETAILS, @ruby_book
mike.checks_out MIKES_DETAILS
check_for_order MIKES_DETAILS, @rails_book
end
def regular_user
open_session do |user|
def user.is_viewing(page)
assert_response :success
assert_template page
end
def user.buys_a(product)
xml_http_request :put, "/store/add_to_cart/#{product.id}"
assert_response :success
end
def user.has_a_cart_containing(*products)
cart = session[:cart]
assert_equal products.size, cart.items.size
for item in cart.items
assert products.include?(item.product)
end
end
def user.checks_out(details)
post "/store/checkout"
assert_response :success
assert_template "checkout"
post_via_redirect "/store/save_order",
:order => { :name => details[:name],
:address => details[:address],
:email => details[:email],
:pay_type => details[:pay_type]
}
assert_response :success
assert_template "index"
assert_equal 0, session[:cart].items.size
end
end
end
def check_for_order(details, *products)
order = Order.find_by_name(details[:name])
assert_not_nil order
assert_equal details[:name], order.name
assert_equal details[:address], order.address
assert_equal details[:email], order.email
assert_equal details[:pay_type], order.pay_type
assert_equal products.size, order.line_items.size
for line_item in order.line_items
assert products.include?(line_item.product)
end
end
end
ruby -I test test/integration/dsl_user_stories_test.rb
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/rubys/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:91.
Loaded suite test/integration/dsl_user_stories_test
Started
EE
Finished in 0.066541 seconds.
1) Error:
test_buying_a_product(DslUserStoriesTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: products: DELETE FROM "products" WHERE 1=1
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `rescue in log'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:204:in `log'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `block in execute'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:418:in `catch_schema_changes'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:265:in `update_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:176:in `update_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:270:in `delete_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:182:in `delete_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:54:in `delete'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `delete_with_query_dirty'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:549:in `delete_existing_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `block (4 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `each'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `block (3 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:510:in `block (2 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:109:in `disable_referential_integrity'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:501:in `block in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/base.rb:1482:in `silence'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:500:in `create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:964:in `load_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:929:in `setup_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `evaluate_method'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `block in run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:23:in `run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/actionpack/lib/action_controller/integration.rb:673:in `run'
2) Error:
test_two_people_buying(DslUserStoriesTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: products: DELETE FROM "products" WHERE 1=1
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `rescue in log'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:204:in `log'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `block in execute'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:418:in `catch_schema_changes'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:172:in `execute'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:265:in `update_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:176:in `update_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:270:in `delete_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:182:in `delete_sql'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:54:in `delete'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `delete_with_query_dirty'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:549:in `delete_existing_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `block (4 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `each'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:511:in `block (3 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:510:in `block (2 levels) in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:109:in `disable_referential_integrity'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:501:in `block in create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/base.rb:1482:in `silence'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:500:in `create_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:964:in `load_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activerecord/lib/active_record/fixtures.rb:929:in `setup_fixtures'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `evaluate_method'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `block in run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:23:in `run'
/home/rubys/git/awdwr/edition3/work-192-23/depot/vendor/rails/actionpack/lib/action_controller/integration.rb:673:in `run'
2 tests, 0 assertions, 0 failures, 2 errors, 0 skips
Test run options: --seed 41139
14.5 Performance Testing 14.3 Functional Testing of Controllers