Skip to content

Commit

Permalink
Added test for setting the @Header attr
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Espinoza committed Apr 22, 2014
1 parent 890b343 commit 7fe3e36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/document_spec.rb
Expand Up @@ -89,4 +89,12 @@
tar_url.title
end
end

describe 'headers' do
it "should set the User-Agent header" do
headers = {'User-Agent' => 'metainspector v0.1'}
page_request = MetaInspector::Document.new('http://pagerankalert.com', headers: headers)
page_request.headers.should eq(headers)
end
end
end

0 comments on commit 7fe3e36

Please sign in to comment.