features/support/test_runner.rb in message-driver-0.2.2 vs features/support/test_runner.rb in message-driver-0.3.0

- old
+ new

@@ -2,11 +2,16 @@ include MessageDriver::Client include RSpec::Matchers attr_accessor :raised_error attr_accessor :current_feature_file + attr_accessor :broker_name + def broker_name + @broker_name ||= MessageDriver::Broker::DEFAULT_BROKER_NAME + end + def run_config_code(src) instance_eval(src, current_feature_file) end def run_test_code(src) @@ -38,10 +43,10 @@ end def fetch_destination(destination) case destination when String, Symbol - MessageDriver::Broker.find_destination(destination) + MessageDriver::Client[self.broker_name].find_destination(destination) when MessageDriver::Destination::Base destination else raise "didn't understand destination #{destination.inspect}" end