Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 54506ecbaa
Fetching contributors…

Cannot retrieve contributors at this time

file 18 lines (15 sloc) 0.872 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
require File.dirname(__FILE__) + '/test_helper.rb'

context "class and method routing" do
  specify "should create a queue called utils:echo for a Util class that subclasses worker and has the method echo" do
    routing = Workling::Routing::ClassAndMethodRouting.new
    routing['utils__echo'].class.to_s.should.equal "Util"
  end
  
  specify "should create a queue called analytics:invites:sent for an Analytics::Invites class that subclasses worker and has the method sent" do
    routing = Workling::Routing::ClassAndMethodRouting.new
    routing['analytics__invites__sent'].class.to_s.should.equal "Analytics::Invites"
  end
  
  specify "queue_names_routing_class should return all queue names associated with a class" do
    routing = Workling::Routing::ClassAndMethodRouting.new
    routing.queue_names_routing_class(Util).should.include 'utils__echo'
  end
end
Something went wrong with that request. Please try again.