Created
July 8, 2012 18:07
-
-
Save jaycfields/3072090 to your computer and use it in GitHub Desktop.
spy and verify
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
require 'spec_helper' | |
describe MyController do | |
describe "create" do | |
it "filters sensitive data from the log" do | |
invocations = Rails.logger.spy_on.add | |
post :create, :myobj => {:social_security_number => "123-45-6789"} | |
invocations.grep(/Parameters:/).first.should include('"social_security_number"=>"[FILTERED]"') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment