Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test case to make sure regex in hash is to_s, since JSON.parse(/a/.to…

…_json) doesnt work
  • Loading branch information...
commit 3628803c04ef98ee0902536e872873f46fa7c563 1 parent acb3628
Darragh Curran authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 spec/exceptional/exception_data_spec.rb
5 spec/exceptional/exception_data_spec.rb
View
@@ -86,6 +86,11 @@ def initialize
Exceptional::ControllerExceptionData.sanitize_hash(input).should == {'crazy' => crazy.to_s, :simple => '123', :some_hash => {'1' => '2'}, :array => ['1','2']}
end
+ it "to_strings regex because JSON.parse(/aa/.to_json) doesn't work" do
+ input = {'crazy' => /abc.*/}
+ Exceptional::ExceptionData.sanitize_hash(input).should == {'crazy' => /abc.*/.to_s}
+ end
+
it "handles session objects with various interfaces" do
class SessionWithInstanceVariables
def initialize
Please sign in to comment.
Something went wrong with that request. Please try again.