clockwork-test 0.5.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ac66ce7ba28c74d19c76db38db26700b4e46266f9b5a13443d2e20a4db8f500
4
- data.tar.gz: 8f39d309947fd883043f6657c208c626cd5623576ab6c1629284c05163834827
3
+ metadata.gz: 9b0dcaa56666f15b8901337706ae5ab9c1c69867ee604f3c67fda671d0ba0595
4
+ data.tar.gz: 2aa1a4be4e081bc26ba922c7ea025417c9e64a68c2a0ce5ae9195d223e227208
5
5
  SHA512:
6
- metadata.gz: c23e87c47ac6364fe1f52fbb49dd1921c4f632869155339fadc8bcc8fcb5b2ab08ff6447cb73685bc21e5ced30fc476218bcf7327d71214e601674ae8cc7926d
7
- data.tar.gz: 68a217dd2373f000a99a57c9f98d8be9b5e9596de266ba80b60dc197e03f62391c29060170f002ff2149d14b82084ba213a32a719b30096246652244bcb4e777
6
+ metadata.gz: d3270ecbf8cb072e24a588bd97694aa0b7388ead25936864420437df608138b968301bfd3ed79c86d978fafc261b996d04eb74f7e5159587a426d2fd5ce10781
7
+ data.tar.gz: 68d2a21169b55bff650f79a988b2428b583ccc887512103f0d172dd593813bb8503c069ce3c5f59575911ec05d8fe3440aacef1c10ab0a0b9b16aca32bfdfe5a
data/CHANGELOG.md CHANGED
@@ -1,8 +1,14 @@
1
1
  ## Current release (in development)
2
2
 
3
+ ## 0.5.1 [2023-04-21]
4
+
5
+ * Fix error introduced in 0.5.0 so now least one clock tick occurs when starting and ending at the same time [#41](https://github.com/kevin-j-m/clockwork-test/pull/41)
6
+
7
+ *Robin Brandt*
8
+
3
9
  ## 0.5.0 [2023-04-20]
4
10
 
5
- * Support timecop safe mode [#39] (https://github.com/kevin-j-m/clockwork-test/pull/39)
11
+ * Support timecop safe mode [#39](https://github.com/kevin-j-m/clockwork-test/pull/39)
6
12
 
7
13
  *Felix Dumit*
8
14
 
@@ -28,7 +34,7 @@
28
34
 
29
35
  ## 0.4.0 [2020-04-23]
30
36
 
31
- * Support clockwork callbacks [#34] (https://github.com/kevin-j-m/clockwork-test/pull/34)
37
+ * Support clockwork callbacks [#34](https://github.com/kevin-j-m/clockwork-test/pull/34)
32
38
 
33
39
  *Rahul Agrawal*
34
40
 
@@ -59,7 +59,7 @@ module Clockwork
59
59
  def tick_loop
60
60
  loop.with_index do |_, index|
61
61
  Timecop.travel(Time.current + @tick_speed.to_i * index) do
62
- return if ticks_exceeded? || time_exceeded?
62
+ return if ticks_exceeded? || (time_exceeded? && index > 0)
63
63
 
64
64
  update_job_history
65
65
  tick
@@ -1,5 +1,5 @@
1
1
  module Clockwork
2
2
  module Test
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
@@ -82,6 +82,15 @@ describe Clockwork::Test::Manager do
82
82
  expect(manager.total_ticks).to be > 0
83
83
  end
84
84
  end
85
+
86
+ context "with same start and end time" do
87
+ let(:end_time) { Time.current }
88
+
89
+ it "runs the clock once" do
90
+ manager.run
91
+ expect(manager.total_ticks).to eq 1
92
+ end
93
+ end
85
94
  end
86
95
 
87
96
  context "recording job history" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clockwork-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Murphy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport