diff options
| author | Robert | 2017-05-29 14:32:43 +0200 |
|---|---|---|
| committer | Robert | 2017-05-29 14:32:43 +0200 |
| commit | b0e6bc3ffd02146fd999f12975f269dac94a0994 (patch) | |
| tree | bd7a6b667dcbab85f52d57aa6ab39a11a1f7a88a | |
| parent | f5af337fa12302ad7275c062c04c0e5de73a2916 (diff) | |
| download | chouette-core-b0e6bc3ffd02146fd999f12975f269dac94a0994.tar.bz2 | |
Revert "time_duration_spec.rb: Make old test style uniform with new tests"
This reverts commit 52d2c968cac7e901b8e6fa3d1be115239b7c5937.
| -rw-r--r-- | spec/lib/time_duration_spec.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/lib/time_duration_spec.rb b/spec/lib/time_duration_spec.rb index bf23f7ba6..1cba1f6d5 100644 --- a/spec/lib/time_duration_spec.rb +++ b/spec/lib/time_duration_spec.rb @@ -4,17 +4,15 @@ describe TimeDuration do describe ".exceeds_gap?" do context "when duration is 4.hours" do it "should return false if gap < 1.hour" do - earlier = Time.now - later = Time.now + 3.minutes - - expect(TimeDuration.exceeds_gap?(4.hours, earlier, later)).to be false + t1 = Time.now + t2 = Time.now + 3.minutes + expect(TimeDuration.exceeds_gap?(4.hours, t1, t2)).to be_falsey end it "should return true if gap > 4.hour" do - earlier = Time.now - later = Time.now + (4.hours + 1.minutes) - - expect(TimeDuration.exceeds_gap?(4.hours, earlier, later)).to be true + t1 = Time.now + t2 = Time.now + (4.hours + 1.minutes) + expect(TimeDuration.exceeds_gap?(4.hours, t1, t2)).to be_truthy end it "returns true when `earlier` is later than `later`" do |
