spec/request_spec.rb in metainspector-5.0.0 vs spec/request_spec.rb in metainspector-5.0.1

- old
+ new

@@ -1,8 +1,14 @@ require 'spec_helper' describe MetaInspector::Request do + it "raises an error if the URL is non-HTTP" do + expect do + MetaInspector::Request.new(url('ftp://ftp.example.com')) + end.to raise_error(MetaInspector::RequestError) + end + describe "read" do it "should return the content of the page" do page_request = MetaInspector::Request.new(url('http://pagerankalert.com')) expect(page_request.read[0..14]).to eq("<!DOCTYPE html>")