spec/http_spec.rb in anemone-0.6.1 vs spec/http_spec.rb in anemone-0.7.0
- old
+ new
@@ -1,6 +1,5 @@
-$:.unshift(File.dirname(__FILE__))
require 'spec_helper'
module Anemone
describe HTTP do
@@ -8,15 +7,10 @@
before(:each) do
FakeWeb.clean_registry
end
it "should still return a Page if an exception occurs during the HTTP connection" do
- class HTTP
- def refresh_connection
- raise "test exception"
- end
- end
-
+ HTTP.stub!(:refresh_connection).and_raise(StandardError)
http = Anemone::HTTP.new
http.fetch_page(SPEC_DOMAIN).should be_an_instance_of(Page)
end
end