test/wolverine/script_test.rb in wolverine-0.2.5 vs test/wolverine/script_test.rb in wolverine-0.2.6
- old
+ new
@@ -41,23 +41,22 @@
tc.assert_operator b, :<, 1
tc.assert_equal :evalsha, c
}
Wolverine.config.instrumentation = callback
redis = Class.new do
- define_method(:evalsha) do |digest, size, *args|
+ define_method(:evalsha) do |digest, *args|
nil
end
end
script.call(redis.new, :a, :b)
end
def test_call_with_cache_hit
tc = self
redis = Class.new do
- define_method(:evalsha) do |digest, size, *args|
+ define_method(:evalsha) do |digest, *args|
tc.assert_equal DIGEST, digest
- tc.assert_equal 2, size
tc.assert_equal [:a, :b], args
end
end
script.call(redis.new, :a, :b)
end
@@ -66,12 +65,11 @@
tc = self
redis = Class.new do
define_method(:evalsha) do |*|
raise "NOSCRIPT No matching script. Please use EVAL."
end
- define_method(:eval) do |content, size, *args|
+ define_method(:eval) do |content, *args|
tc.assert_equal CONTENT, content
- tc.assert_equal 2, size
tc.assert_equal [:a, :b], args
end
end
script.call(redis.new, :a, :b)
end