summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMorgan Haskel <morgan@puppetlabs.com>2015-06-04 10:51:41 -0700
committerMorgan Haskel <morgan@puppetlabs.com>2015-06-04 10:51:41 -0700
commitc69b75f88bba933857c161945721b3802445d9be (patch)
tree622e7d2792d0ca86c5ce75c898e3605562e12db1 /spec
parent0dd4f69424787f2af64d8e94bf371810025cb141 (diff)
parentad4ca4cc3486b0eaaa813595907521ce35c970ce (diff)
Merge pull request #469 from hunner/fix_time
Fix time() on 1.8.7
Diffstat (limited to 'spec')
-rwxr-xr-xspec/functions/time_spec.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/functions/time_spec.rb b/spec/functions/time_spec.rb
index 2875e25..d157939 100755
--- a/spec/functions/time_spec.rb
+++ b/spec/functions/time_spec.rb
@@ -7,7 +7,7 @@ describe 'time' do
context 'when running at a specific time' do
before(:each) {
# get a value before stubbing the function
- test_time = Time.utc(2006, 10, 13, 8, 15, 11, '+01:00')
+ test_time = Time.utc(2006, 10, 13, 8, 15, 11)
Time.expects(:new).with().returns(test_time).once
}
it { is_expected.to run.with_params().and_return(1160727311) }
@@ -16,13 +16,6 @@ describe 'time' do
it { is_expected.to run.with_params({}).and_return(1160727311) }
it { is_expected.to run.with_params('foo').and_return(1160727311) }
it { is_expected.to run.with_params('UTC').and_return(1160727311) }
-
- context 'when running on modern rubies', :unless => RUBY_VERSION == '1.8.7' do
- it { is_expected.to run.with_params('America/Los_Angeles').and_return(1160727311) }
- end
-
- context 'when running on ruby 1.8.7, which garbles the TZ', :if => RUBY_VERSION == '1.8.7' do
- it { is_expected.to run.with_params('America/Los_Angeles').and_return(1160702111) }
- end
+ it { is_expected.to run.with_params('America/New_York').and_return(1160727311) }
end
end