fairway 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -10,8 +10,8 @@ module Fairway
|
|
10
10
|
@connection.deliver(message, channel)
|
11
11
|
end
|
12
12
|
|
13
|
-
def method_missing(method, *args)
|
14
|
-
@connection.respond_to?(method) ? @connection.send(method, *args) : super
|
13
|
+
def method_missing(method, *args, &block)
|
14
|
+
@connection.respond_to?(method) ? @connection.send(method, *args, &block) : super
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/fairway/version.rb
CHANGED
@@ -17,8 +17,14 @@ module Fairway
|
|
17
17
|
let(:message) { { facet: 1, topic: "event:helloworld" } }
|
18
18
|
|
19
19
|
it "delegates non existant methods to parent connection" do
|
20
|
-
base_connection.should_receive(:random_method)
|
21
|
-
|
20
|
+
base_connection.should_receive(:random_method) do |arg1, arg2, &block|
|
21
|
+
block.call(arg1, arg2)
|
22
|
+
end
|
23
|
+
|
24
|
+
connection.random_method(1, 2) do |arg1, arg2|
|
25
|
+
arg1.should == 1
|
26
|
+
arg2.should == 2
|
27
|
+
end
|
22
28
|
end
|
23
29
|
|
24
30
|
describe "#deliver" do
|