Sha256: 2c53896c37a68b4ed9e091b08334f832dbc6d3cffe1bc2db7acbcd30db10f9c7
Contents?: true
Size: 926 Bytes
Versions: 1
Compression:
Stored size: 926 Bytes
Contents
require 'spec_helper' describe APIMatchers::Headers::BeXML do describe "actual.should be_xml" do it "should pass when the actual is json response" do "application/xml; charset=utf-8".should be_xml end it "should not pass when the actual is not a json response" do expect { "application/json; charset=utf-8".should be_xml }.to fail_with(%Q{expected a XML response with 'application/xml; charset=utf-8'. Got: 'application/json; charset=utf-8'.}) end end describe "actual.should_not be_xml" do it "should pass when the actual is not a json response" do "application/json; charset=utf-8".should_not be_xml end it "should not pass when the actual is a json response" do expect { "application/xml; charset=utf-8".should_not be_xml }.to fail_with(%Q{expected to not be a XML response. Got: 'application/xml; charset=utf-8'.}) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
api_matchers-0.0.1 | spec/api_matchers/headers/be_xml_spec.rb |