- Fixed a bug in Table#<< which effected subtables and grouping for
tables without column names (tests inlined below)
- now depends on RedCloth 3.0.3 or higher rather than 3.0.4
- no longer carries a bunch of junk files. (i hope)
== Note
If you are using 0.8.0 please update, these bugs will probably bite
you otherwise.
== Coverage for bugs. The source was Table#<< but the tests burrow downward.
test_groupable.rb:
#Ticket #155
def test_ensure_grouping_works_with_nameless_tables
a = [[1,2],[3,4],[5,6]].to_table
a.create_group("foo") { true }
a[1].tag("grp_bar")
assert_nothing_raised { a.groups }
assert_equal a, a.group("foo")
assert_equal [a[1]].to_table, a.group("bar")
end
test_table.rb:
def test_ensure_subtable_works_with_unnamed_tables
a = [[1,2,3],[4,5,6]].to_table
b = a.sub_table { |r| (r[0] % 2).zero? }
assert_equal [[4,5,6]].to_table, b
end
def test_ensure_appending_records_works_with_unnamed_tables
a = [[1,2,3],[4,5,6]].to_table
a << Ruport::Data::Record.new([7,8,9])
assert_equal [[1,2,3],[4,5,6],[7,8,9]].to_table,a
end