shoulda_create 0.0.8 → 0.0.9

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.
@@ -92,7 +92,11 @@ module ShouldaCreate
92
92
  should "not change #{description}", :before => before do
93
93
  old_value = self.instance_variable_get( before_var_name )
94
94
  new_value = code.bind(self).call
95
- assert_equal old_value, new_value, "#{description} changed"
95
+ if old_value.nil?
96
+ assert_nil new_value, "#{description} changed"
97
+ else
98
+ assert_equal old_value, new_value, "#{description} changed"
99
+ end
96
100
  end
97
101
  end
98
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda_create
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
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: 2015-09-09 00:00:00.000000000 Z
12
+ date: 2017-01-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: I like using should_create and friends to make assertions about records
15
15
  coming and going in the database. Shoulda did, but doesn't any more. With this,