"
err = Recording.stderr do
@handler.handle(Result.new(:response => stub(:html? => true, :body => bad_html)))
end
err.should == ""
end
it "rejects unclosed html" do
response = stub(:html? => true, :body => '
', :code => 200)
result = @handler.handle(Result.new(:response => response))
result.success.should == false
result.description.should == "Bad HTML (Scanner)"
end
it "loves the good html" do
response = stub(:html? => true, :body => '
', :code => 200)
@handler.handle(Result.new(:response => response)).should == nil
end
it "ignores non html" do
response = stub(:html? => false, :body => '
', :code => 200)
@handler.handle(Result.new(:response => response)).should == nil
end
end