require 'test_helper' class ResponseTest < Minitest::Test def test_initialize_success response = RateResponse.new(true, "success!", {:rate => 'Free!'}, :rates => [stub(:service_name => 'Free!', :total_price => 0)], :xml => "Free!") assert response.success? end def test_initialize_failure assert_raises(ActiveShipping::ResponseError) do RateResponse.new(false, "fail!", {:rate => 'Free!'}, :rates => [stub(:service_name => 'Free!', :total_price => 0)], :xml => "Free!") end end end