spec/zen/package/comments/anti_spam.rb in zen-0.3 vs spec/zen/package/comments/anti_spam.rb in zen-0.4

- old
+ new

@@ -1,8 +1,8 @@ require File.expand_path('../../../../helper', __FILE__) -describe('Comments::AntiSpam') do +describe 'Comments::AntiSpam' do behaves_like :capybara spam_comment = 'Hello, you can buy viagra here ' \ '<a href="http://buyviagra.com/">Buy Viagra</a>' @@ -21,23 +21,23 @@ stub_request( :post, 'http://api.defensio.com/2.0/users/test/documents.yaml' ).to_return(:body => yaml_response) - it('Fail to use an invalid engine') do + it 'Fail to use an invalid engine' do should.raise?(ArgumentError) do Comments::AntiSpam.validate(:foobar, nil, nil, nil, spam_comment) end end - it('Validate a spam comment using Defensio') do + it 'Validate a spam comment using Defensio' do get_setting(:defensio_key).value = 'test' Comments::AntiSpam.validate(:defensio, nil, nil, nil, spam_comment) \ .should == true end - it('Fail to validate using defensio without an API key') do + it 'Fail to validate using defensio without an API key' do get_setting(:defensio_key).value = nil should.raise? do Comments::AntiSpam.validate(:defensio, nil, nil, nil, spam_comment) end