Skip to content

Commit

Permalink
Correct a test to use true/false instead of 1/0.
Browse files Browse the repository at this point in the history
  • Loading branch information
treed committed Aug 12, 2009
1 parent 035af4a commit 264f804
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions t/hash/exists.t
Expand Up @@ -6,25 +6,25 @@ plan 8
a = {"foo" => "bar", "baz" => "quux", "frotz" => nil}

b = a.has_key?("foo")
is b, 1, "has_key? true"
is b, true, "has_key? true"

b = a.has_key?("nope")
is b, 0, "has_key? false"
is b, false, "has_key? false"

b = a.include?("foo")
is b, 1, "include?"
is b, true, "include?"

b = a.key?("foo")
is b, 1, "key?"
is b, true, "key?"

b = a.member?("foo")
is b, 1, "member?"
is b, true, "member?"

b = a.has_value?("baz")
is b, 1, "has_value? true"
is b, true, "has_value? true"

b = a.has_value?("frotz")
is b, 0, "has_value? false"
is b, false, "has_value? false"

b = a.value?("foo")
is b, 1, "value?"
is b, true, "value?"

0 comments on commit 264f804

Please sign in to comment.