dm-is-persistent_state_machine 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-is-persistent_state_machine}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["michael"]
@@ -92,7 +92,7 @@ module DataMapper
92
92
  property :state_id, Integer, :required => true, :min => 1
93
93
  belongs_to :state
94
94
 
95
- has n, Extlib::Inflection.pluralize(target_model_name+"StateChange").to_sym
95
+ has n, Extlib::Inflection.pluralize(target_model_name+"StateChange").snake_case.to_sym
96
96
 
97
97
  # generate a FooState class that is derived from State
98
98
  state_model = Object.full_const_set(self.to_s+"State", Class.new(State))
@@ -36,6 +36,7 @@ describe DataMapper::Is::PersistentStateMachine do
36
36
  ProjectStateChange.count.should == 0
37
37
  @project.state.code.should == "reviewed"
38
38
  @project.save
39
+ @project.project_state_changes.length.should == 1
39
40
  ProjectStateChange.count.should == 1
40
41
  ProjectStateChange.first.user.name.should == "John Doe"
41
42
  ProjectStateChange.first.project.should == @project
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-is-persistent_state_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - michael