File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44require_relative "redis/errors"
55
66class Redis
7+ @exists_returns_integer = true
8+
79 class << self
810 attr_reader :exists_returns_integer
911
Original file line number Diff line number Diff line change 33module Lint
44 module ValueTypes
55 def test_exists
6- assert_equal false , r . exists ( "foo" )
6+ assert_equal 0 , r . exists ( "foo" )
77
88 r . set ( "foo" , "s1" )
99
10- assert_equal true , r . exists ( "foo" )
10+ assert_equal 1 , r . exists ( "foo" )
1111 end
1212
1313 def test_exists_integer
1414 previous_exists_returns_integer = Redis . exists_returns_integer
15- Redis . exists_returns_integer = true
16- assert_equal 0 , r . exists ( "foo" )
15+ Redis . exists_returns_integer = false
16+ assert_equal false , r . exists ( "foo" )
1717
1818 r . set ( "foo" , "s1" )
1919
20- assert_equal 1 , r . exists ( "foo" )
20+ assert_equal true , r . exists ( "foo" )
2121 ensure
2222 Redis . exists_returns_integer = previous_exists_returns_integer
2323 end
You can’t perform that action at this time.
0 commit comments