Sha256: a0d12cdadfacb5acdbd25cc71abdcde251cffbb6fd6b349f4474f7941f37d34c
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
require File.expand_path "lib/rakismet" require 'ostruct' RSpec.configure do |config| config.mock_with(:rspec) { |c| c.syntax = :should } config.expect_with(:rspec) { |c| c.syntax = :should } end class AkismetModel include Rakismet::Model end def comment_attrs(attrs={}) { :comment_type => 'test', :author => 'Rails test', :author_email => 'test@test.host', :author_url => 'test.host', :content => 'comment content', :blog => Rakismet.url }.merge(attrs) end def akismet_attrs(attrs={}) { :comment_type => 'test', :comment_author_email => 'test@test.host', :comment_author => 'Rails test', :comment_author_url => 'test.host', :comment_content => 'comment content' }.merge(attrs) end def request OpenStruct.new(:user_ip => '127.0.0.1', :user_agent => 'RSpec', :referrer => 'http://test.host/referrer') end def request_with_headers OpenStruct.new(:user_ip => '127.0.0.1', :user_agent => 'RSpec', :referrer => 'http://test.host/referrer', :http_headers => { 'HTTP_USER_AGENT' => 'RSpec', 'HTTP_REFERER' => 'http://test.host/referrer' } ) end def empty_request OpenStruct.new(:user_ip => nil, :user_agent => nil, :referrer => nil, :http_headers => nil) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rakismet-1.5.4 | spec/spec_helper.rb |