human_time 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/human_time/rspec_matchers.rb +13 -0
- data/lib/human_time/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b12cbffd26a4db1167ac7c77d7828a5cd8c99afc
|
4
|
+
data.tar.gz: be0ebc498f5669a01b54fbcea79a8e3f163c8b7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a950b477a762ebc7c0723ca028d7db879e14d6216138b6221a254198669fb1f262b1b6457d5d7e699a027c5ab2afe502aa02d6c1e2e58de75cccab6f84558b3
|
7
|
+
data.tar.gz: f2ad8b5d90ff11862a548bf15ffc618e81fb64334b3d9e280b75ade9663eebe018f8a254cfca021378882a7311a0e0b09e4c29b33464e0ea0ea9269dc501d6b9
|
data/README.md
CHANGED
@@ -104,9 +104,11 @@ newer_date = Date.parse('2016-01-02')
|
|
104
104
|
|
105
105
|
expect(newer_date).to be_more_recent_than(older_date)
|
106
106
|
expect(newer_date).to be_newer_than(older_date)
|
107
|
+
expect(newer_date).to be_after(older_date)
|
107
108
|
expect(newer_date).to be_more_recent_than_or_equal_to(older_date)
|
108
109
|
expect(newer_date).to be_newer_than_or_equal_to(newer_date)
|
109
110
|
expect(older_date).to be_older_than(newer_date)
|
111
|
+
expect(older_date).to be_before(newer_date)
|
110
112
|
expect(older_date).to be_older_than_or_equal_to(older_date)
|
111
113
|
```
|
112
114
|
|
@@ -12,6 +12,12 @@ RSpec::Matchers.define :be_newer_than do |expected|
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
RSpec::Matchers.define :be_after do |expected|
|
16
|
+
match do |actual|
|
17
|
+
actual > expected
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
15
21
|
RSpec::Matchers.define :be_more_recent_than_or_equal_to do |expected|
|
16
22
|
match do |actual|
|
17
23
|
actual >= expected
|
@@ -30,6 +36,13 @@ RSpec::Matchers.define :be_older_than do |expected|
|
|
30
36
|
end
|
31
37
|
end
|
32
38
|
|
39
|
+
|
40
|
+
RSpec::Matchers.define :be_before do |expected|
|
41
|
+
match do |actual|
|
42
|
+
actual < expected
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
33
46
|
RSpec::Matchers.define :be_older_than_or_equal_to do |expected|
|
34
47
|
match do |actual|
|
35
48
|
actual <= expected
|
data/lib/human_time/version.rb
CHANGED