nasty 0.0.1388164765 → 0.0.1388164945
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/spec/unit/expose_binding_spec.rb +3 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b71e88f2f1647f03ea7348dd25a05063f1d2e79
|
4
|
+
data.tar.gz: d66b28ae3bad143e4e2d17654bed7f9d838808ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80300cc75ea744e01bdf12c6292ed21cfbd1949136e447e5829a71d615161c136c85c06a3501f7463d3bf98c18d4194d98333419b86040ec7b9dd2a1ba3b0dc3
|
7
|
+
data.tar.gz: e5c3a75c5a11d70bbe784fc98eac87d3c796b1e01338604b70037a504dedd4d945aa040777b0d3a58420a44c93adde9ccca875ab8df5fa2946f2f0714e59654a
|
@@ -3,14 +3,12 @@ require "spec_helper"
|
|
3
3
|
module Nasty
|
4
4
|
describe ExposeBinding do
|
5
5
|
it "exposes an objects private binding" do
|
6
|
-
item = Object.new
|
7
|
-
item.instance_eval do
|
6
|
+
item = Object.new.instance_eval do
|
8
7
|
@message = "secret"
|
8
|
+
self
|
9
9
|
end
|
10
10
|
item.extend(Nasty::ExposeBinding)
|
11
|
-
|
12
|
-
result = ERB.new("<%= @message %>").result(binding)
|
13
|
-
result.should == "secret"
|
11
|
+
eval("@message", item.get_binder).should == "secret"
|
14
12
|
end
|
15
13
|
end
|
16
14
|
end
|