spec/rakismet_spec.rb in rakismet-1.3.0 vs spec/rakismet_spec.rb in rakismet-1.4.0

- old
+ new

@@ -18,9 +18,21 @@ Rakismet.proxy_host.should be_nil Rakismet.proxy_port.should be_nil end end + describe "url" do + it "should allow url to be a string" do + Rakismet.url = "string.example.com" + Rakismet.url.should eql("string.example.com") + end + + it "should allow url to be a proc" do + Rakismet.url = Proc.new { "proc.example.com" } + Rakismet.url.should eql("proc.example.com") + end + end + describe ".validate_config" do it "should raise an error if key is not found" do Rakismet.key = '' lambda { Rakismet.send(:validate_config) }.should raise_error(Rakismet::Undefined) end