Sha256: 27dbca87a4d9bdf892b51976ff9d004841700e852586ce7886904c25b6480ff9
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
require File.join(File.expand_path('../../test_helper', __FILE__)) class WolverineIntegrationTest < MiniTest::Unit::TestCase CONTENT = File.read(File.expand_path('../lua/util/mexists.lua', __FILE__)) def mock_redis stub.tap do |redis| redis.expects(:evalsha). with('fe24f4dd4ba7881608cca4b846f009195e06d79a', 2, :a, :b). raises("NOSCRIPT") redis.expects(:eval). with(CONTENT, 2, :a, :b). returns([1, 0]) end end def test_everything Wolverine.config.redis = mock_redis Wolverine.config.script_path = Pathname.new(File.expand_path('../lua', __FILE__)) assert_equal [1, 0], Wolverine.util.mexists(:a, :b) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wolverine-0.2.3 | test/integration/wolverine_integration_test.rb |