我正在使用 Torquebox 构建触发器捕获系统,并将Torquespec用于TDD/BDD系统管理捕获的触发器队列并处理它们。以下是torquebox.rb配置文件和start_spec.rb规范文件的片段
扭矩箱.rb
TorqueBox.configure do
pool :web, :type => :shared
service TriggerTrapperService do
config do
name 'RTBS triggers trapper service'
end
end
queue '/queues/rtbs_triggers_queue'
end
start_spec.rb
require 'torquespec'
require 'torquebox-core'
require 'spec_helper'
describe "local test" do
deploy <<-END.gsub(/^ {4}/,'')
application:
root: #{File.dirname(__FILE__)}/../app
END
remote_describe "remote test" do
include TorqueBox::Injectors
it "should work" do
some_service = fetch('/queues/rtbs_triggers_queue')
some_service.should.equal? nil
end
end
end
我遇到的问题是,当我在远程块中获取队列rtbs_triggers_queue时,它返回nil,就好像在测试环境中未读取Torquebox.rb并且我对torquebox.yml也有相同的结果,可能是什么原因 ?提前致谢