batch 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +0 -26
- data/batch.gemspec +1 -1
- data/lib/batch.rb +1 -0
- data/test/batch_test.rb +12 -0
- metadata +1 -1
data/README.markdown
CHANGED
@@ -51,29 +51,3 @@ Installation
|
|
51
51
|
------------
|
52
52
|
|
53
53
|
$ gem install batch
|
54
|
-
|
55
|
-
License
|
56
|
-
-------
|
57
|
-
|
58
|
-
Copyright (c) 2010 Damian Janowski and Michel Martens
|
59
|
-
|
60
|
-
Permission is hereby granted, free of charge, to any person
|
61
|
-
obtaining a copy of this software and associated documentation
|
62
|
-
files (the "Software"), to deal in the Software without
|
63
|
-
restriction, including without limitation the rights to use,
|
64
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
65
|
-
copies of the Software, and to permit persons to whom the
|
66
|
-
Software is furnished to do so, subject to the following
|
67
|
-
conditions:
|
68
|
-
|
69
|
-
The above copyright notice and this permission notice shall be
|
70
|
-
included in all copies or substantial portions of the Software.
|
71
|
-
|
72
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
73
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
74
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
75
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
76
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
77
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
78
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
79
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
data/batch.gemspec
CHANGED
data/lib/batch.rb
CHANGED
data/test/batch_test.rb
CHANGED
@@ -95,4 +95,16 @@ EOS
|
|
95
95
|
|
96
96
|
assert_equal expected.rstrip, stdout.rstrip
|
97
97
|
end
|
98
|
+
|
99
|
+
should "work with empty enumerables" do
|
100
|
+
stdout, _ = capture do
|
101
|
+
Batch.each([]) { }
|
102
|
+
end
|
103
|
+
|
104
|
+
expected = <<-EOS
|
105
|
+
0%
|
106
|
+
EOS
|
107
|
+
|
108
|
+
assert_equal expected.rstrip, stdout.rstrip
|
109
|
+
end
|
98
110
|
end
|