File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 22
33describe JsonSpec ::Matchers ::HaveJsonType do
44 it "matches hashes" do
5- %({}) . should have_json_type ( Hash )
5+ hash = %({})
6+ hash . should have_json_type ( Hash )
7+ hash . should have_json_type ( :object )
68 end
79
810 it "matches arrays" do
3436 %(1e+1) . should have_json_type ( Float )
3537 end
3638
39+ it "matches booleans" do
40+ %(true) . should have_json_type ( :boolean )
41+ %(false) . should have_json_type ( :boolean )
42+ end
43+
3744 it "matches ancestor classes" do
3845 %(10) . should have_json_type ( Numeric )
3946 %(10.0) . should have_json_type ( Numeric )
7380 end
7481
7582 it "matches null" do
76- %(null) . should have_json_type ( NilClass )
83+ null = %(null)
84+ null . should have_json_type ( NilClass )
85+ null . should have_json_type ( :nil )
86+ null . should have_json_type ( :null )
7787 end
7888 end
7989end
You can’t perform that action at this time.
0 commit comments