markevans-block_helpers 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/block_helpers.gemspec +1 -1
- data/lib/block_helpers.rb +1 -0
- data/spec/helpers/block_helpers_spec.rb +10 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/block_helpers.gemspec
CHANGED
data/lib/block_helpers.rb
CHANGED
@@ -39,6 +39,9 @@ describe TestHelperModule do
|
|
39
39
|
def yog
|
40
40
|
yoghurt[0..2]
|
41
41
|
end
|
42
|
+
def jelly_in_div
|
43
|
+
content_tag :div, 'jelly'
|
44
|
+
end
|
42
45
|
end
|
43
46
|
end
|
44
47
|
end
|
@@ -49,6 +52,13 @@ describe TestHelperModule do
|
|
49
52
|
<% end %>
|
50
53
|
)).should match_html("Yog")
|
51
54
|
end
|
55
|
+
it "should give the yielded renderer access to normal actionview helper methods" do
|
56
|
+
eval_erb(%(
|
57
|
+
<% test_helper do |r| %>
|
58
|
+
<%= r.jelly_in_div %>
|
59
|
+
<% end %>
|
60
|
+
)).should match_html("<div>jelly</div>")
|
61
|
+
end
|
52
62
|
end
|
53
63
|
|
54
64
|
describe "surrounding the block" do
|