spec/akismet_spec.rb in mikehale-akismet-0.0.3 vs spec/akismet_spec.rb in mikehale-akismet-0.0.4
- old
+ new
@@ -59,9 +59,13 @@
request.body.should include("comment_author=joe%20smith")
request.body.should include("comment_author_email=joe@smith.com")
request.body.should include("comment_author_url=blog.smith.com")
request.body.should include("comment_content=viagra-test-123")
end
+
+ it "should handle nil values" do
+ lambda {@akismet.spam?(params.update(:referrer => nil))}.should_not raise_error
+ end
it "should detect ham" do
@akismet.ham?(params.update(:comment_content => "not spam")).should == true
end