time_until_break 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2247b6c53470e78bd8d7a034f44696c92e42f170
4
- data.tar.gz: 1ab9d64e9b3e7dc40ff39bbf546efd9918b704b7
3
+ metadata.gz: e7232db33a1f572441ef8bd2b621e59bb60b3845
4
+ data.tar.gz: d3cc6d73932af1d78df5b40f611b7d553b94ffe2
5
5
  SHA512:
6
- metadata.gz: c2f15149222a1b46063c42d5e6c831eb6332c640411b0f26d179cf0460a09969f2d985d3427b43c7c6fd79a333fc378bd4041130be493be8ed01fa6fe453e440
7
- data.tar.gz: 1774335ffc3dca7e79a2d18d55360acbd673070246e521c53d8b912fe36a2c098c9ef1111dcb7728c586b1988eb1792249c546c2528b0ed1b2913bb3c6888191
6
+ metadata.gz: 12355ca1005c2020a5c945d0d69a9be2cd63303d90ac492d789a3e16ba1d807fed61cd1827d5c8eb0ec73865ff46ca371ec219313bbeac7dc19e4831144b5063
7
+ data.tar.gz: 8caf9a3297eff90c64904373066bba1757d47a17c66534a873eb04cc33dbd61ca737bf8ded5bf0264de1f24bbe5a4a7face57d045784b41dd7f0b1191fa15ea3
@@ -1,3 +1,3 @@
1
1
  class TimeUntilBreak
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1 +1,2 @@
1
- require 'time_until_break'
1
+ require 'time_until_break'
2
+ require 'delorean'
@@ -17,12 +17,20 @@ describe TimeUntilBreak do
17
17
  expect(time_two.break_time.strftime("%H:%M:%S")).to eq "14:30:00"
18
18
  end
19
19
 
20
- xit 'knows if the break has been yet' do
20
+ it 'knows if the break has been missed' do
21
+ Delorean.time_travel_to(Time.utc(2014,11,17,22,45))
22
+ expect(time.has_break_been?).to eq true
23
+ end
24
+
25
+ it 'knows if the break has not been missed' do
26
+ Delorean.time_travel_to(Time.utc(2014,11,17,10,34))
21
27
  expect(time.has_break_been?).to eq false
22
28
  end
23
29
 
24
- xit 'can calculate how long until the next break in hours and minutes' do
25
- expect(time.message).to eq "6 hours, 50 minutes"
30
+ it 'can calculate how long until the next break in hours and minutes' do
31
+ Delorean.time_travel_to(Time.utc(2014,11,17,10,36))
32
+ expect(time).to receive(:`).with('say "6 hours, 9 minutes"')
33
+ time.message
26
34
  end
27
35
 
28
36
  end
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "delorean"
24
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_until_break
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Giles
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: delorean
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: This is my second gem which will be available in the command line and
56
70
  which will tell Makers Academy students how long it is until the Mandatory Break
57
71
  at 4:45pm.