spec/lib/rawler_spec.rb in rawler-0.0.9 vs spec/lib/rawler_spec.rb in rawler-0.1.0

- old
+ new

@@ -97,13 +97,19 @@ rawler.responses[url][:status].should == 301 end it "should save username and password" do - rawler = Rawler::Base.new('http://example.com', output, 'my_user', 'secret') + rawler = Rawler::Base.new('http://example.com', output, {:username => 'my_user', :password => 'secret'}) Rawler.username.should == 'my_user' Rawler.password.should == 'secret' + end + + it "should save wait" do + rawler = Rawler::Base.new('http://example.com', output, {:wait => 5}) + + Rawler.wait.should == 5 end it "should rescue from Errno::ECONNREFUSED" do url = 'http://example.com' from = 'http://other.com'