factory_boy 1.0.3 → 1.0.4

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/lib/plant.rb CHANGED
@@ -50,7 +50,7 @@ module Plant
50
50
 
51
51
  def self.pool symbol
52
52
  instance = plants[symbol] || plants[symbol.to_s.camelize.constantize]
53
- object = instance.dup
53
+ object = instance.clone
54
54
  yield object if block_given?
55
55
  @@pool[instance.class] ||= []
56
56
  @@pool[instance.class] << object
data/test/help_test.rb CHANGED
@@ -6,4 +6,5 @@ require 'models/adress'
6
6
  require 'models/user'
7
7
  require 'models/profile'
8
8
  require 'models/customer'
9
+
9
10
  require 'mocha'
data/test/test_plant.rb CHANGED
@@ -106,6 +106,7 @@ class PlantTest < Test::Unit::TestCase
106
106
  user_2 = Plant(:user, :name => "Vincent")
107
107
 
108
108
  assert_equal "Elise", user_1.name
109
+ assert_equal "Vincent", user_2.name
109
110
  end
110
111
 
111
112
  private
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_boy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philippe Cantin