ruby-duration 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/duration.rb +8 -0
- data/ruby-duration.gemspec +1 -1
- data/test/test_duration.rb +10 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/lib/duration.rb
CHANGED
data/ruby-duration.gemspec
CHANGED
data/test/test_duration.rb
CHANGED
@@ -37,5 +37,15 @@ class TestDuration < MiniTest::Unit::TestCase
|
|
37
37
|
d = Duration.new(:weeks => 1, :days => 2, :hours => 3, :minutes => 4, :seconds => 5)
|
38
38
|
assert_equal("P1W2DT3H4M5S", d.iso8601)
|
39
39
|
end
|
40
|
+
|
41
|
+
def test_blank?
|
42
|
+
assert_true Duration.new.blank?
|
43
|
+
assert_false Duration.new(1).blank?
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_present?
|
47
|
+
assert_false Duration.new.present?
|
48
|
+
assert_true Duration.new(1).present?
|
49
|
+
end
|
40
50
|
|
41
51
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-duration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jose Peleteiro
|