factory_girl 2.0.0.rc2 → 2.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/features/support/test.db +0 -0
- data/lib/factory_girl/definition_proxy.rb +1 -1
- data/lib/factory_girl/version.rb +1 -1
- data/spec/spec_helper.rb +4 -2
- metadata +16 -16
data/features/support/test.db
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module FactoryGirl
|
2
2
|
class DefinitionProxy
|
3
|
-
UNPROXIED_METHODS = %w(__send__ nil? send object_id extend instance_eval initialize block_given? raise)
|
3
|
+
UNPROXIED_METHODS = %w(__send__ __id__ nil? send object_id extend instance_eval initialize block_given? raise)
|
4
4
|
|
5
5
|
(instance_methods + private_instance_methods).each do |method|
|
6
6
|
undef_method(method) unless UNPROXIED_METHODS.include?(method)
|
data/lib/factory_girl/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -31,8 +31,8 @@ module DefinesConstants
|
|
31
31
|
def self.included(example_group)
|
32
32
|
example_group.class_eval do
|
33
33
|
before do
|
34
|
-
@defined_constants
|
35
|
-
@created_tables
|
34
|
+
@defined_constants ||= []
|
35
|
+
@created_tables ||= []
|
36
36
|
end
|
37
37
|
|
38
38
|
after do
|
@@ -40,12 +40,14 @@ module DefinesConstants
|
|
40
40
|
namespace, class_name = *constant_path(path)
|
41
41
|
namespace.send(:remove_const, class_name)
|
42
42
|
end
|
43
|
+
@defined_constants.clear
|
43
44
|
|
44
45
|
@created_tables.each do |table_name|
|
45
46
|
ActiveRecord::Base.
|
46
47
|
connection.
|
47
48
|
execute("DROP TABLE IF EXISTS #{table_name}")
|
48
49
|
end
|
50
|
+
@created_tables.clear
|
49
51
|
end
|
50
52
|
|
51
53
|
def define_class(path, base = Object, &block)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_girl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15424083
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 2.0.0.
|
11
|
+
- 3
|
12
|
+
version: 2.0.0.rc3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Joe Ferris
|
@@ -21,8 +21,6 @@ date: 2011-07-05 00:00:00 -04:00
|
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
name: rcov
|
25
|
-
prerelease: false
|
26
24
|
type: :development
|
27
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
28
26
|
none: false
|
@@ -34,9 +32,9 @@ dependencies:
|
|
34
32
|
- 0
|
35
33
|
version: "0"
|
36
34
|
version_requirements: *id001
|
37
|
-
|
38
|
-
name: rspec
|
35
|
+
name: rcov
|
39
36
|
prerelease: false
|
37
|
+
- !ruby/object:Gem::Dependency
|
40
38
|
type: :development
|
41
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
40
|
none: false
|
@@ -48,9 +46,9 @@ dependencies:
|
|
48
46
|
- 0
|
49
47
|
version: "0"
|
50
48
|
version_requirements: *id002
|
51
|
-
|
52
|
-
name: cucumber
|
49
|
+
name: rspec
|
53
50
|
prerelease: false
|
51
|
+
- !ruby/object:Gem::Dependency
|
54
52
|
type: :development
|
55
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
54
|
none: false
|
@@ -62,9 +60,9 @@ dependencies:
|
|
62
60
|
- 0
|
63
61
|
version: "0"
|
64
62
|
version_requirements: *id003
|
65
|
-
|
66
|
-
name: activerecord
|
63
|
+
name: cucumber
|
67
64
|
prerelease: false
|
65
|
+
- !ruby/object:Gem::Dependency
|
68
66
|
type: :development
|
69
67
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
68
|
none: false
|
@@ -78,9 +76,9 @@ dependencies:
|
|
78
76
|
- 5
|
79
77
|
version: 2.3.5
|
80
78
|
version_requirements: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
79
|
name: activerecord
|
83
80
|
prerelease: false
|
81
|
+
- !ruby/object:Gem::Dependency
|
84
82
|
type: :development
|
85
83
|
requirement: &id005 !ruby/object:Gem::Requirement
|
86
84
|
none: false
|
@@ -96,9 +94,9 @@ dependencies:
|
|
96
94
|
- 3
|
97
95
|
version: 3.0.0.beta3
|
98
96
|
version_requirements: *id005
|
99
|
-
|
100
|
-
name: rr
|
97
|
+
name: activerecord
|
101
98
|
prerelease: false
|
99
|
+
- !ruby/object:Gem::Dependency
|
102
100
|
type: :development
|
103
101
|
requirement: &id006 !ruby/object:Gem::Requirement
|
104
102
|
none: false
|
@@ -110,9 +108,9 @@ dependencies:
|
|
110
108
|
- 0
|
111
109
|
version: "0"
|
112
110
|
version_requirements: *id006
|
113
|
-
|
114
|
-
name: sqlite3
|
111
|
+
name: rr
|
115
112
|
prerelease: false
|
113
|
+
- !ruby/object:Gem::Dependency
|
116
114
|
type: :development
|
117
115
|
requirement: &id007 !ruby/object:Gem::Requirement
|
118
116
|
none: false
|
@@ -124,6 +122,8 @@ dependencies:
|
|
124
122
|
- 0
|
125
123
|
version: "0"
|
126
124
|
version_requirements: *id007
|
125
|
+
name: sqlite3
|
126
|
+
prerelease: false
|
127
127
|
description: |-
|
128
128
|
factory_girl provides a framework and DSL for defining and
|
129
129
|
using factories - less error-prone, more explicit, and
|