timecop 0.4.1 → 0.4.2

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.
data/History.rdoc CHANGED
@@ -1,3 +1,13 @@
1
+ === 0.4.1 / 2012-07-27
2
+
3
+ * Maintenance
4
+ * Mock Time#new the same as Time#now since they're synonyms
5
+ * Set default arg in parsing to 2000
6
+ * Time.freeze defaults to Time#now
7
+ * Use Time#parse is available to parse Time's given as strings
8
+ * Add ActiveSupport Time.zone support
9
+ * Stop DateTime from losing precision after traveling
10
+
1
11
  === 0.3.5 / 2010-06-07
2
12
 
3
13
  * Maintenance
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 4
@@ -99,7 +99,7 @@ class Timecop
99
99
  elsif arg.nil?
100
100
  Time.now
101
101
  else
102
- if Time.respond_to?(:parse)
102
+ if Time.respond_to?(:parse) && arg.is_a?(String)
103
103
  Time.parse(arg)
104
104
  else
105
105
  # we'll just assume it's a list of y/m/d/h/m/s
@@ -165,6 +165,11 @@ class TestTimeStackItem < Test::Unit::TestCase
165
165
  Timecop.freeze(date)
166
166
  end
167
167
 
168
+ def test_parse_only_string_with_active_support
169
+ Time.expects(:parse).never
170
+ Timecop.freeze(2011, 01, 02, hour=0, minute=0, second=0)
171
+ end
172
+
168
173
  def test_integration_with_rails_time_zone
169
174
  time = Time.now
170
175
  def time.in_time_zone
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.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: