spec/hallon/hallon_spec.rb in hallon-0.13.0 vs spec/hallon/hallon_spec.rb in hallon-0.14.0
- old
+ new
@@ -16,6 +16,18 @@
subject { Hallon::URI }
example_uris.keys.each do |uri|
it { should match uri }
end
end
+
+ describe "#load_timeout" do
+ it "should raise an error given a negative timeout" do
+ expect { Hallon.load_timeout = -1 }.to raise_error(ArgumentError)
+ end
+
+ it "should allow setting and retrieving the value" do
+ Hallon.load_timeout.should eq 5
+ Hallon.load_timeout = 0.2
+ Hallon.load_timeout.should eq 0.2
+ end
+ end
end