Skip to content

Commit

Permalink
Make Parser test work w/ new Lint Rack validator, add Content-Length.
Browse files Browse the repository at this point in the history
  • Loading branch information
macournoyer committed Feb 3, 2009
1 parent 36ff335 commit 40132be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Expand Up @@ -63,15 +63,15 @@ def negative_failure_message
class ValidateWithLint
def matches?(request)
@request = request
Rack::Lint.new(proc{[200, {'Content-Type' => 'text/html'}, []]}).call(@request.env)
Rack::Lint.new(proc{[200, {'Content-Type' => 'text/html', 'Content-Length' => '0'}, []]}).call(@request.env)
true
rescue Rack::Lint::LintError => e
@message = e.message
false
end

def failure_message(negation=nil)
"should#{negation} validate with Rack Lint"
"should#{negation} validate with Rack Lint: #{@message}"
end

def negative_failure_message
Expand Down

0 comments on commit 40132be

Please sign in to comment.