spec/http2_spec.rb in http2-0.0.17 vs spec/http2_spec.rb in http2-0.0.18

- old
+ new

@@ -24,11 +24,11 @@ it "should be able to do normal post-requests." do require "json" #Test posting keep-alive and advanced post-data. - Http2.new(:host => "www.partyworm.dk") do |http| + Http2.new(:host => "www.partyworm.dk", :debug => false) do |http| 0.upto(5) do resp = http.get("multipart_test.php") resp = http.post(:url => "multipart_test.php?choice=post-test", :post => { "val1" => "test1", @@ -107,7 +107,13 @@ end it "should be able to convert URL's to 'is.gd'-short-urls" do isgd = Http2.isgdlink("https://github.com/kaspernj/http2") raise "Expected isgd-var to be valid but it wasnt: '#{isgd}'." if !isgd.match(/^http:\/\/is\.gd\/([A-z\d]+)$/) + end + + it "should raise exception when something is not found" do + expect{ + res = Http2.new(:host => "www.partyworm.dk").get("something_that_does_not_exist.php") + }.to raise_error end end \ No newline at end of file