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 CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{block_helpers}
5
- s.version = "0.1.0"
5
+ s.version = "0.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Mark Evans"]
data/lib/block_helpers.rb CHANGED
@@ -26,6 +26,7 @@ module BlockHelpers
26
26
  end
27
27
  )
28
28
  klass.class_eval do
29
+ include ActionView::Helpers
29
30
  include klass.parent
30
31
  end
31
32
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markevans-block_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Evans