Created
March 3, 2012 04:35
-
-
Save spastorino/1964379 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/test/context_test.rb b/test/context_test.rb | |
| index 36e7022..aefe2b9 100644 | |
| --- a/test/context_test.rb | |
| +++ b/test/context_test.rb | |
| @@ -913,4 +913,19 @@ describe 'Rack::Cache::Context' do | |
| response.body.should.equal 'Hello World' | |
| cache.trace.should.include :pass | |
| end | |
| + | |
| + it 'logs to rack.logger if available' do | |
| + logger = Struct.new(:expect).new | |
| + class << logger | |
| + def info(message) | |
| + self.expect = "info" | |
| + end | |
| + end | |
| + | |
| + respond_with 200 | |
| + get '/', | |
| + 'rack.logger' => logger | |
| + response.should.be.ok | |
| + logger.expect.should.equal "info" | |
| + end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment