herbie 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/herbie/html_helpers.rb +1 -1
- data/lib/herbie.rb +1 -1
- data/spec/herbie_spec.rb +4 -4
- metadata +3 -3
data/lib/herbie/html_helpers.rb
CHANGED
data/lib/herbie.rb
CHANGED
data/spec/herbie_spec.rb
CHANGED
@@ -78,13 +78,13 @@ describe Herbie::Helpers do
|
|
78
78
|
describe "link helpers" do
|
79
79
|
it "should be able to output a simple link" do
|
80
80
|
href = "http://www.foo.com/"
|
81
|
-
|
81
|
+
link_to(href).should == "<a href=\"#{href}\">#{href}</a>"
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should be able to output a link with href and text" do
|
85
85
|
href = "http://www.foo.com/"
|
86
86
|
text = "Visit foo.com"
|
87
|
-
|
87
|
+
link_to(href, text).should == "<a href=\"#{href}\">#{text}</a>"
|
88
88
|
end
|
89
89
|
|
90
90
|
it "should be able to output links with arbitrary attributes" do
|
@@ -94,7 +94,7 @@ describe Herbie::Helpers do
|
|
94
94
|
:class => "navigation",
|
95
95
|
:target => "_parent"
|
96
96
|
}
|
97
|
-
|
97
|
+
link_to(href, text, attrs).should == "<a href=\"#{href}\" class=\"#{attrs[:class]}\" target=\"#{attrs[:target]}\">#{text}</a>"
|
98
98
|
end
|
99
99
|
|
100
100
|
it "should be able to output a link enclosing arbitrary markup provided by a block" do
|
@@ -105,7 +105,7 @@ describe Herbie::Helpers do
|
|
105
105
|
:class => "image"
|
106
106
|
}
|
107
107
|
markup_block = Proc.new { tag :img, :src => "foo.png" }
|
108
|
-
|
108
|
+
link_to(href, text, attrs, &markup_block).should == "<a href=\"#{href}\" class=\"#{attrs[:class]}\">#{capture_erb(&markup_block)}</a>"
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: herbie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-09-22 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70233134684500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '2.6'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70233134684500
|
25
25
|
description: Lovable HTML view helpers for use with ERB.
|
26
26
|
email: ben@kapowaz.net
|
27
27
|
executables: []
|