Navigation Menu

Skip to content

Commit

Permalink
Add test for Resque.redis=(<a Redis::Namespace>).
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Thomas committed Apr 19, 2011
1 parent 246a082 commit be61b0f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/resque_test.rb
Expand Up @@ -16,6 +16,15 @@
assert_equal 'namespace', Resque.redis.namespace
end

test "redis= works correctly with a Redis::Namespace param" do
new_redis = Redis.new(:host => "localhost", :port => 9736)
new_namespace = Redis::Namespace.new("namespace", :redis => new_redis)
Resque.redis = new_namespace
assert_equal new_namespace, Resque.redis

Resque.redis = 'localhost:9736/namespace'
end

test "can put jobs on a queue" do
assert Resque::Job.create(:jobs, 'SomeJob', 20, '/tmp')
assert Resque::Job.create(:jobs, 'SomeJob', 20, '/tmp')
Expand Down

0 comments on commit be61b0f

Please sign in to comment.