Sha256: f83837765b4bf3802663f43b258592a1450c772c8596a9c2c0c3e6f3e4adc2cc
Contents?: true
Size: 874 Bytes
Versions: 2
Compression:
Stored size: 874 Bytes
Contents
require File.dirname(__FILE__) + "/integration_helper" feature "exception handling" do describe "in an action that raises an exception" do scenario "should make an HTTP call to the API" do stub_request(:post, "#{Errplane::API_HOST}/exceptions").to_return(status: 200) lambda { visit new_widget_path }.should raise_error assert_requested :post, "#{Errplane::API_HOST}/api/v1/applications/#{Errplane.configuration.application_id}/exceptions/test?api_key=f123-e456-d789c012" end end describe "in an action that does not raise an exception" do scenario "should not make an HTTP call to the API" do lambda { visit widgets_path }.should_not raise_error assert_not_requested :post, "#{Errplane::API_HOST}/api/v1/applications/#{Errplane.configuration.application_id}/exceptions/test?api_key=f123-e456-d789c012" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
errplane-0.0.2 | spec/integration/exceptions_spec.rb |
errplane-0.0.1 | spec/integration/exceptions_spec.rb |