bzproxies 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/bzproxies/array_proxy.rb +2 -2
- data/lib/bzproxies/base.rb +1 -1
- data/lib/bzproxies/version.rb +1 -1
- data/spec/array_proxy_spec.rb +5 -1
- metadata +1 -1
@@ -9,7 +9,7 @@ module Proxies
|
|
9
9
|
proxy = @proxies.first
|
10
10
|
@target = @target.map do |i|
|
11
11
|
unless i.respond_to? :stub?
|
12
|
-
proxy.new i, :proxies => @proxies[1..-1]
|
12
|
+
proxy.new i, :proxies => @proxies[1..-1], :options => @options
|
13
13
|
else
|
14
14
|
i
|
15
15
|
end
|
@@ -24,7 +24,7 @@ module Proxies
|
|
24
24
|
proxy = @proxies.first
|
25
25
|
@target = @target.map do |i|
|
26
26
|
unless i.respond_to? :stub?
|
27
|
-
proxy.new i, :proxies => @proxies[1..-1]
|
27
|
+
proxy.new i, :proxies => @proxies[1..-1], :options => @options
|
28
28
|
else
|
29
29
|
i
|
30
30
|
end
|
data/lib/bzproxies/base.rb
CHANGED
data/lib/bzproxies/version.rb
CHANGED
data/spec/array_proxy_spec.rb
CHANGED
@@ -24,7 +24,7 @@ describe Proxies::ArrayProxy do
|
|
24
24
|
context "if proxies" do
|
25
25
|
before(:all) do
|
26
26
|
@test = [1,2,3]
|
27
|
-
@proxy = Proxies::ArrayProxy.new @test, :proxies => TestCovering
|
27
|
+
@proxy = Proxies::ArrayProxy.new @test, :proxies => TestCovering, :options => "test"
|
28
28
|
end
|
29
29
|
|
30
30
|
it "have a copy of given array" do
|
@@ -74,6 +74,10 @@ describe Proxies::ArrayProxy do
|
|
74
74
|
@proxy.should each_respond_to :test?
|
75
75
|
|
76
76
|
end
|
77
|
+
|
78
|
+
it "should pass options recursively" do
|
79
|
+
@proxy.map(&:options).should == (0...@proxy.length).map{|i| "test"}
|
80
|
+
end
|
77
81
|
end
|
78
82
|
|
79
83
|
context "if doesn't proxy" do
|