padrino-helpers 0.10.5 → 0.10.6.a

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ describe "FormatHelpers" do
15
15
  context 'for #simple_format method' do
16
16
  should "format simple text into html format" do
17
17
  actual_text = simple_format("Here is some basic text...\n...with a line break.")
18
- assert_equal "<p>Here is some basic text...\n<br />...with a line break.</p>", actual_text
18
+ assert_equal "<p>Here is some basic text...\n<br>...with a line break.</p>", actual_text
19
19
  end
20
20
 
21
21
  should "format more text into html format" do
@@ -31,7 +31,7 @@ describe "FormatHelpers" do
31
31
  context 'wrapped in a custom tag' do
32
32
  should "format simple text into html format" do
33
33
  actual_text = simple_format("Here is some basic text...\n...with a line break.", :tag => :div)
34
- assert_equal "<div>Here is some basic text...\n<br />...with a line break.</div>", actual_text
34
+ assert_equal "<div>Here is some basic text...\n<br>...with a line break.</div>", actual_text
35
35
  end
36
36
 
37
37
  should "format more text into html format" do
@@ -7,37 +7,19 @@ describe "TagHelpers" do
7
7
  end
8
8
 
9
9
  context 'for #tag method' do
10
- should("support tags with no content no attributes") do
11
- assert_has_tag(:br) { tag(:br) }
12
- end
13
-
14
- should("support tags with no content with attributes") do
15
- actual_html = tag(:br, :style => 'clear:both', :class => 'yellow')
16
- assert_has_tag(:br, :class => 'yellow', :style=>'clear:both') { actual_html }
17
- end
18
-
19
10
  should "support selected attribute by using 'selected' if true" do
20
11
  actual_html = tag(:option, :selected => true)
21
12
  assert_has_tag('option', :selected => 'selected') { actual_html }
22
13
  end
23
14
 
24
- should "support tags with content no attributes" do
25
- assert_has_tag(:p, :content => "Demo String") { tag(:p, :content => "Demo String") }
26
- end
27
-
28
- should "support tags with content and attributes" do
29
- actual_html = tag(:p, :content => "Demo", :class => 'large', :id => 'intro')
30
- assert_has_tag('p#intro.large', :content => "Demo") { actual_html }
31
- end
32
-
33
- should "support open tags" do
34
- actual_html = tag(:p, :class => 'demo', :open => true)
35
- assert_equal "<p class=\"demo\">", actual_html
15
+ should "support data attributes" do
16
+ actual_html = tag(:a, :data => { :remote => true, :method => 'post'})
17
+ assert_has_tag(:a, 'data-remote' => 'true', 'data-method' => 'post') { actual_html }
36
18
  end
37
19
 
38
20
  should "escape html" do
39
21
  actual_html = tag(:br, :class => 'Example "bar"')
40
- assert_equal "<br class=\"Example &quot;bar&quot;\" />", actual_html
22
+ assert_equal "<br class=\"Example &quot;bar&quot;\">", actual_html
41
23
  end
42
24
  end
43
25
 
metadata CHANGED
@@ -1,8 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-helpers
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.10.5
4
+ hash: 98
5
+ prerelease: 7
6
+ segments:
7
+ - 0
8
+ - 10
9
+ - 6
10
+ - a
11
+ version: 0.10.6.a
6
12
  platform: ruby
7
13
  authors:
8
14
  - Padrino Team
@@ -13,8 +19,7 @@ autorequire:
13
19
  bindir: bin
14
20
  cert_chain: []
15
21
 
16
- date: 2011-10-12 00:00:00 -07:00
17
- default_executable:
22
+ date: 2012-01-23 00:00:00 Z
18
23
  dependencies:
19
24
  - !ruby/object:Gem::Dependency
20
25
  name: padrino-core
@@ -24,7 +29,13 @@ dependencies:
24
29
  requirements:
25
30
  - - "="
26
31
  - !ruby/object:Gem::Version
27
- version: 0.10.5
32
+ hash: 98
33
+ segments:
34
+ - 0
35
+ - 10
36
+ - 6
37
+ - a
38
+ version: 0.10.6.a
28
39
  type: :runtime
29
40
  version_requirements: *id001
30
41
  - !ruby/object:Gem::Dependency
@@ -35,6 +46,10 @@ dependencies:
35
46
  requirements:
36
47
  - - ~>
37
48
  - !ruby/object:Gem::Version
49
+ hash: 7
50
+ segments:
51
+ - 0
52
+ - 6
38
53
  version: "0.6"
39
54
  type: :runtime
40
55
  version_requirements: *id002
@@ -146,7 +161,6 @@ files:
146
161
  - test/test_output_helpers.rb
147
162
  - test/test_render_helpers.rb
148
163
  - test/test_tag_helpers.rb
149
- has_rdoc: true
150
164
  homepage: http://www.padrinorb.com
151
165
  licenses: []
152
166
 
@@ -160,17 +174,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
174
  requirements:
161
175
  - - ">="
162
176
  - !ruby/object:Gem::Version
177
+ hash: 3
178
+ segments:
179
+ - 0
163
180
  version: "0"
164
181
  required_rubygems_version: !ruby/object:Gem::Requirement
165
182
  none: false
166
183
  requirements:
167
- - - ">="
184
+ - - ">"
168
185
  - !ruby/object:Gem::Version
169
- version: 1.3.6
186
+ hash: 25
187
+ segments:
188
+ - 1
189
+ - 3
190
+ - 1
191
+ version: 1.3.1
170
192
  requirements: []
171
193
 
172
194
  rubyforge_project: padrino-helpers
173
- rubygems_version: 1.6.2
195
+ rubygems_version: 1.8.15
174
196
  signing_key:
175
197
  specification_version: 3
176
198
  summary: Helpers for padrino
@@ -233,3 +255,4 @@ test_files:
233
255
  - test/test_output_helpers.rb
234
256
  - test/test_render_helpers.rb
235
257
  - test/test_tag_helpers.rb
258
+ has_rdoc: