datagrid 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
data/datagrid.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{datagrid}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bogdan Gusiev"]
@@ -20,7 +20,7 @@ describe Datagrid::Helper do
20
20
  ) }
21
21
  let(:grid) { SimpleReport.new }
22
22
 
23
- describe ".report_table" do
23
+ describe ".datagrid_table" do
24
24
  before(:each) do
25
25
  subject.stub!(:datagrid_order_for).and_return(subject.content_tag(:div, "", :class => "order"))
26
26
  end
@@ -50,6 +50,23 @@ describe Datagrid::Helper do
50
50
  )
51
51
  end
52
52
  end
53
+
54
+ describe ".datagrid_order_for" do
55
+ it "should render ordreing layout" do
56
+ class OrderedGrid
57
+ include Datagrid
58
+ scope { Entry }
59
+ column(:category)
60
+ end
61
+ report = OrderedGrid.new
62
+ subject.datagrid_order_for(report, report.column_by_name(:category)).should equal_to_dom(<<-HTML)
63
+ <div class="order">
64
+ <a href="ordered_grid%5Bdescending%5D=&amp;ordered_grid%5Border%5D=category" class="order asc">ASC</a> <a href="ordered_grid%5Bdescending%5D=true&amp;ordered_grid%5Border%5D=category" class="order desc">DESC</a>
65
+ </div>
66
+ HTML
67
+ end
68
+
69
+ end
53
70
 
54
71
 
55
72
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: datagrid
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1
5
+ version: 0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bogdan Gusiev
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
- hash: 4430126750120291741
208
+ hash: 1627043791496053267
209
209
  segments:
210
210
  - 0
211
211
  version: "0"