私はTorquebox でトリガー キャプチャ システムを構築しており、 TDD/BDDシステムにTorquespecを使用して、キャプチャされたトリガーのキューを管理し、それらを処理します。以下は、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をフェッチすると、テスト環境でトルクボックス.rbが読み取られていないかのようにnilが返され、トルクボックス.ymlでも同じ結果が得られたことです。理由 ?前もって感謝します