easy_dl 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/easy_dl.gemspec CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/easy_dl/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Jakub Głuszecki"]
6
6
  gem.email = ["jakub.gluszecki@expander.pl"]
7
- gem.description = %q{Gem for generating html definition lists}
8
- gem.summary = %q{Gem for generating html definition lists}
7
+ gem.description = %q{Gem for generating html definition lists in Rails 3}
8
+ gem.summary = %q{Gem for generating html definition lists in Rails 3}
9
9
  gem.homepage = "https://github.com/cthulhu666/easy_dl"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
@@ -18,7 +18,9 @@ module EasyDl
18
18
  if block_given?
19
19
  yield @obj
20
20
  else
21
- concat @obj.send(name)
21
+ if val = @obj.send(name)
22
+ concat(val.to_s)
23
+ end
22
24
  end
23
25
  concat '</dd>'
24
26
 
@@ -1,3 +1,3 @@
1
1
  module EasyDl
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -22,6 +22,21 @@ class DlHelperTest < ActionView::TestCase
22
22
  should "have 2 <dd> tags" do
23
23
  assert_select 'dl dd', 2
24
24
  end
25
+
26
+ context '' do
27
+
28
+ setup do
29
+ @person = OpenStruct.new(name: 'John', surname: 'Doe', age: 30)
30
+ concat(definition_list_for(@person, class: 'second') do |d|
31
+ d.item :age
32
+ end)
33
+ end
34
+
35
+ should "print textual values of age attribute" do
36
+ assert_select 'dl.second dd', '30'
37
+ end
38
+
39
+ end
25
40
  end
26
41
 
27
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_dl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,9 +9,9 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-28 00:00:00.000000000 Z
12
+ date: 2012-11-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Gem for generating html definition lists
14
+ description: Gem for generating html definition lists in Rails 3
15
15
  email:
16
16
  - jakub.gluszecki@expander.pl
17
17
  executables: []
@@ -50,10 +50,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  version: '0'
51
51
  requirements: []
52
52
  rubyforge_project:
53
- rubygems_version: 1.8.15
53
+ rubygems_version: 1.8.24
54
54
  signing_key:
55
55
  specification_version: 3
56
- summary: Gem for generating html definition lists
56
+ summary: Gem for generating html definition lists in Rails 3
57
57
  test_files:
58
58
  - test/dl_helper_test.rb
59
59
  - test/test_helper.rb