ruport 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -1
- data/Rakefile +2 -2
- data/lib/ruport.rb +1 -1
- data/lib/ruport/format.rb +1 -7
- data/lib/ruport/format/engine.rb +3 -2
- data/lib/ruport/format/plugin.rb +6 -3
- data/test/unit.log +7 -4732
- metadata +30 -36
- data/lib/ruport/data/set.rb.rej +0 -147
- data/lib/ruport/data/set.rb~ +0 -73
- data/lib/ruport/system_extensions.rb.rej +0 -32
- data/test/test_plugin.rb.rej +0 -50
- data/test/test_set.rb.rej +0 -16
- data/test/test_set.rb~ +0 -110
data/test/test_set.rb.rej
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
***************
|
2
|
-
*** 63,68 ****
|
3
|
-
assert_equal(set3.data.length, 3)
|
4
|
-
assert_equal(Set.new(:data => [ %w[a b c], %w[x y z], ["d","","e"] ]), set3)
|
5
|
-
assert_equal((set | set2), set.union(set2))
|
6
|
-
end
|
7
|
-
|
8
|
-
def test_difference
|
9
|
-
--- 63,69 ----
|
10
|
-
assert_equal(set3.data.length, 3)
|
11
|
-
assert_equal(Set.new(:data => [ %w[a b c], %w[x y z], ["d","","e"] ]), set3)
|
12
|
-
assert_equal((set | set2), set.union(set2))
|
13
|
-
+ assert_equal((set | set2), set + (set2))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_difference
|
data/test/test_set.rb~
DELETED
@@ -1,110 +0,0 @@
|
|
1
|
-
#!/usr/local/bin/ruby -w
|
2
|
-
|
3
|
-
require "test/unit"
|
4
|
-
require "ruport"
|
5
|
-
|
6
|
-
class TestSet < Test::Unit::TestCase
|
7
|
-
include Ruport::Data
|
8
|
-
|
9
|
-
def setup
|
10
|
-
@empty_set = Set.new
|
11
|
-
@set = Set.new :data => [%w[shirt box onion]]
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_constructor
|
15
|
-
assert_not_nil @empty_set
|
16
|
-
|
17
|
-
assert_not_nil @set
|
18
|
-
assert_not_nil @set.data
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_set_is_a_collection
|
22
|
-
assert_kind_of Ruport::Data::Collection, @set
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_equality
|
26
|
-
assert_equal @set, Set.new(:data => [%w[shirt box onion]])
|
27
|
-
assert_not_equal @set, Set.new(:data => [%w[hat bucket turnip]])
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_append_record
|
31
|
-
s = Set.new
|
32
|
-
assert s.data.empty?
|
33
|
-
s << Record.new([1,2,3])
|
34
|
-
assert_equal [Record.new([1,2,3])], s.data.to_a
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_append_array
|
38
|
-
s = Set.new
|
39
|
-
assert s.data.empty?
|
40
|
-
s << [1,2,3]
|
41
|
-
assert_equal [Record.new([1,2,3])], s.data.to_a
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_dup
|
45
|
-
assert_not_equal @set.data.object_id, @set.dup.data.object_id
|
46
|
-
end
|
47
|
-
# def test_append_hash
|
48
|
-
# s = Set.new
|
49
|
-
# assert s.data.empty?
|
50
|
-
# s << {:a => 1, :b => 2, :c => 3}
|
51
|
-
# assert_equal [Record.new([1,2,3], :attributes => [:a,:b,:c])], s.data.to_a
|
52
|
-
# end
|
53
|
-
|
54
|
-
def test_union
|
55
|
-
set = Set.new
|
56
|
-
set << %w[ a b c ] << %w[ x y z ]
|
57
|
-
|
58
|
-
set2 = Set.new
|
59
|
-
set2 << %w[ a b c ] << ["d","","e"]
|
60
|
-
|
61
|
-
set3 = set | set2
|
62
|
-
assert_kind_of(Set, set3)
|
63
|
-
assert_equal(set3.data.length, 3)
|
64
|
-
assert_equal(Set.new(:data => [ %w[a b c], %w[x y z], ["d","","e"] ]), set3)
|
65
|
-
assert_equal((set | set2), set.union(set2))
|
66
|
-
assert_equal((set | set2), set + (set2))
|
67
|
-
end
|
68
|
-
|
69
|
-
def test_difference
|
70
|
-
set = Set.new
|
71
|
-
set << %w[ a b c ] << %w[x y z] << [1,2,3]
|
72
|
-
|
73
|
-
set2 = Set.new
|
74
|
-
set2 << %w[ a b c ]
|
75
|
-
|
76
|
-
set3 = set - set2
|
77
|
-
assert_kind_of(Set, set3)
|
78
|
-
assert_equal(2, set3.data.length)
|
79
|
-
assert_equal(Set.new(:data => [ %w[x y z], [1,2,3] ]), set3)
|
80
|
-
assert_equal((set - set2), set.difference(set2))
|
81
|
-
end
|
82
|
-
|
83
|
-
def test_intersection
|
84
|
-
set = Set.new
|
85
|
-
set << %w[ a b c ] << %w[x y z] << [1,2,3]
|
86
|
-
|
87
|
-
set2 = Set.new
|
88
|
-
set2 << %w[ a b c ]
|
89
|
-
|
90
|
-
set3 = set & set2
|
91
|
-
assert_kind_of(Set, set3)
|
92
|
-
assert_equal(1, set3.data.length)
|
93
|
-
assert_equal(Set.new(:data => [ %w[a b c] ]), set3)
|
94
|
-
assert_equal((set & set2), set.intersection(set2))
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_exclusion
|
98
|
-
set = Set.new
|
99
|
-
set << %w[ a b c ] << %w[x y z] << [1,2,3]
|
100
|
-
|
101
|
-
set2 = Set.new
|
102
|
-
set2 << %w[ a b c ]
|
103
|
-
|
104
|
-
set3 = set ^ set2
|
105
|
-
assert_kind_of(Set, set3)
|
106
|
-
assert_equal(2, set3.data.length)
|
107
|
-
assert_equal(Set.new(:data => [ %w[x y z], [1,2,3] ]), set3)
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|