stator 0.0.17 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -64,7 +64,6 @@ module Stator
64
64
  end
65
65
 
66
66
  def track_transition
67
- self.attempt_to_track_state(self.state_was)
68
67
  self.attempt_to_track_state(self.state)
69
68
  self.attempt_to_track_state_changed_timestamp
70
69
 
@@ -1,7 +1,7 @@
1
1
  module Stator
2
2
  MAJOR = 0
3
- MINOR = 0
4
- PATCH = 17
3
+ MINOR = 1
4
+ PATCH = 0
5
5
  PRERELEASE = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, PATCH, PRERELEASE].compact.join('.')
data/spec/model_spec.rb CHANGED
@@ -156,12 +156,18 @@ describe Stator::Model do
156
156
  Time.zone = 'Eastern Time (US & Canada)'
157
157
  end
158
158
 
159
+ it 'should store the initial state timestamp when the record is created' do
160
+ a = Animal.new
161
+ a.save
162
+ a.unborn_status_at.should be_within(1).of(Time.zone.now)
163
+ end
164
+
159
165
  it 'should store when a record changed state for the first time' do
160
166
  a = Animal.new
161
167
  a.unborn_status_at.should be_nil
162
168
  a.born_status_at.should be_nil
163
169
  a.birth
164
- a.unborn_status_at.should be_within(1).of(Time.zone.now)
170
+ a.unborn_status_at.should be_nil
165
171
  a.born_status_at.should be_within(1).of(Time.zone.now)
166
172
  end
167
173
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-20 00:00:00.000000000 Z
12
+ date: 2014-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord