timecop 0.6.0 → 0.6.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.
@@ -152,7 +152,7 @@ class Timecop
152
152
  end
153
153
 
154
154
  def time_klass
155
- Time.respond_to?(:zone) ? Time.zone : Time
155
+ Time.respond_to?(:zone) && Time.zone ? Time.zone : Time
156
156
  end
157
157
  end
158
158
  end
@@ -1,3 +1,3 @@
1
1
  class Timecop
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -248,6 +248,14 @@ class TestTimeStackItem < Test::Unit::TestCase
248
248
  end
249
249
  end
250
250
 
251
+ def test_time_zone_returns_nil
252
+ c = class << Time; self end
253
+ c.send(:define_method, :zone) { nil }
254
+ assert_nothing_raised do
255
+ Timecop.freeze
256
+ end
257
+ end
258
+
251
259
  def test_nsecs_are_set
252
260
  time = Time.now
253
261
  Timecop.freeze time
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timecop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-08 00:00:00.000000000 Z
13
+ date: 2013-03-11 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: A gem providing "time travel" and "time freezing" capabilities, making
16
16
  it dead simple to test time-dependent code. It provides a unified method to mock