hq-dev 0.0.7 → 0.0.8
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/data/gem-versions +1 -1
- data/features/time.feature +19 -0
- data/lib/hq/cucumber/time.rb +5 -4
- 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: 76a747b156b40a50334430a5fdb58c2adb9d248e
|
4
|
+
data.tar.gz: 579e97eec4e6a7dd6315230381ab079a9ab2d995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59f562e5954216c2e9ff64f50379665775a15e648b077fbdd4969753fa27c0741feaf2ce982a33f95b3317cfd28046f96cd2124ea5d5490d881b0dcd049b9ab0
|
7
|
+
data.tar.gz: 0d2b0b22dc04103ee353060505d1d0ec368746dc050a9fec63ec3a29ee3441fd9c70ff224f6c5eb4203050439dbed021ec70bc84ce79f8aa172273e9d0a24617
|
data/data/gem-versions
CHANGED
data/features/time.feature
CHANGED
@@ -54,3 +54,22 @@ Feature: Time manipulation
|
|
54
54
|
1 scenario (1 passed)
|
55
55
|
2 steps (2 passed)
|
56
56
|
"""
|
57
|
+
|
58
|
+
Scenario: Override with ymd hms
|
59
|
+
|
60
|
+
Given a file "features/test.feature":
|
61
|
+
"""
|
62
|
+
Feature:
|
63
|
+
Scenario:
|
64
|
+
Given the time is 1970-01-02 10:17:36
|
65
|
+
Then the time should be 123456
|
66
|
+
"""
|
67
|
+
|
68
|
+
When I run "cucumber"
|
69
|
+
|
70
|
+
Then the exit status should be 0
|
71
|
+
And the output should contain:
|
72
|
+
"""
|
73
|
+
1 scenario (1 passed)
|
74
|
+
2 steps (2 passed)
|
75
|
+
"""
|
data/lib/hq/cucumber/time.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require "cucumber/rspec/doubles"
|
2
|
+
require "time"
|
2
3
|
|
3
4
|
Before do
|
4
5
|
|
@@ -21,10 +22,10 @@ Given /^the time is (.+)$/ do
|
|
21
22
|
|
22
23
|
case time_str
|
23
24
|
|
24
|
-
|
25
|
+
when /^(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})$/
|
25
26
|
|
26
|
-
|
27
|
-
|
27
|
+
@time_override =
|
28
|
+
Time.parse "#{$1}T#{$2}Z"
|
28
29
|
|
29
30
|
when /^(\d+)$/
|
30
31
|
|