Download (14.4 MB, 10:01)
Alternative download für iPod & Apple TV(11.2 MB, 10:01)
- exception_notification
- exception_logger
- HopToad
- Exceptional
- Episode 104: Exception Notifications
- Episode 158: Factories not Fixtures
- Episode 156: Webrat
- Full episode source code
Quellcode:
[bash]
script/generate integration_test exceptions
rake test:integration
[/bash]
[ruby]
# test/integration/exceptions_test.rb
class ExceptionsTest < ActionController::IntegrationTest
fixtures :all
test "POST /products" do
post "/products", "commit"=>"Submit", "product"=>{"name"=>"Headphones", "price"=>"-2"}
assert_response :success
end
test "GET /products/8/edit" do
product = Product.first
get "/products/#{product.id}/edit"
assert_response :success
end
end
[/ruby]