fusionary-easel_helpers 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/easel_helpers.gemspec +1 -1
- data/lib/easel_helpers/helpers/grid_helper.rb +3 -1
- data/test/grid_helper_test.rb +6 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'rake/testtask'
|
|
3
3
|
require 'rake/rdoctask'
|
4
4
|
require 'echoe'
|
5
5
|
|
6
|
-
Echoe.new("easel_helpers", "0.2.
|
6
|
+
Echoe.new("easel_helpers", "0.2.14") do |p|
|
7
7
|
p.description = "Fusionary Rails View Helpers"
|
8
8
|
p.url = "http://github.com/fusionary/easel_helpers"
|
9
9
|
p.author = "Joshua Clayton"
|
data/easel_helpers.gemspec
CHANGED
@@ -52,8 +52,10 @@ module EaselHelpers
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def container(size=nil, *args, &block)
|
55
|
+
opts = args.extract_options!
|
56
|
+
opts.merge!(:suppress_col => true) if size.nil?
|
55
57
|
args = args.insert(0, :container)
|
56
|
-
column(size, *args, &block)
|
58
|
+
column(size, *([args, opts].flatten), &block)
|
57
59
|
end
|
58
60
|
|
59
61
|
def clean_column(classes, &block)
|
data/test/grid_helper_test.rb
CHANGED
@@ -29,6 +29,7 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
29
29
|
|
30
30
|
show_view template do
|
31
31
|
assert_select ".container", 1
|
32
|
+
assert_select ".container.col-24", 0
|
32
33
|
assert_select ".col-24", 1
|
33
34
|
assert_select ".col-12", 2
|
34
35
|
assert_select ".col-12#primary", 1
|
@@ -109,7 +110,7 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
109
110
|
|
110
111
|
should "properly assign classes for a deeply-nested view" do
|
111
112
|
template = %(
|
112
|
-
<% container do %>
|
113
|
+
<% container :full do %>
|
113
114
|
<% column :half do %>
|
114
115
|
<% fieldset :hform, :half do %>
|
115
116
|
<% set :one_third do %>text<% end %>
|
@@ -127,6 +128,7 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
127
128
|
)
|
128
129
|
|
129
130
|
show_view template do
|
131
|
+
assert_select "div.container.col-24", 1
|
130
132
|
assert_select "div.container" do
|
131
133
|
assert_select "div.col-12" do
|
132
134
|
assert_select "fieldset.hform.col-6" do
|
@@ -190,7 +192,9 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
190
192
|
context "column" do
|
191
193
|
|
192
194
|
should "allow assigning options hash without having to define a width" do
|
193
|
-
show_view %(
|
195
|
+
show_view %(
|
196
|
+
<% column :id => "my-custom-id", :class => "content" do %>words<% end %>
|
197
|
+
) do
|
194
198
|
assert_select "div.col-24.content#my-custom-id", "words"
|
195
199
|
end
|
196
200
|
end
|