object-daddy 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +37 -39
- data/README.markdown +12 -5
- data/VERSION +1 -1
- data/object-daddy.gemspec +5 -5
- data/spec/object_daddy_spec.rb +2 -2
- data/spec/resources/schema +2 -0
- metadata +25 -25
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,35 +1,34 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (3.
|
5
|
-
actionpack (= 3.
|
6
|
-
mail (~> 2.
|
7
|
-
actionpack (3.
|
8
|
-
activemodel (= 3.
|
9
|
-
activesupport (= 3.
|
4
|
+
actionmailer (3.2.3)
|
5
|
+
actionpack (= 3.2.3)
|
6
|
+
mail (~> 2.4.4)
|
7
|
+
actionpack (3.2.3)
|
8
|
+
activemodel (= 3.2.3)
|
9
|
+
activesupport (= 3.2.3)
|
10
10
|
builder (~> 3.0.0)
|
11
11
|
erubis (~> 2.7.0)
|
12
|
-
|
13
|
-
rack (~> 1.
|
14
|
-
rack-cache (~> 1.
|
15
|
-
rack-mount (~> 0.8.2)
|
12
|
+
journey (~> 1.0.1)
|
13
|
+
rack (~> 1.4.0)
|
14
|
+
rack-cache (~> 1.2)
|
16
15
|
rack-test (~> 0.6.1)
|
17
|
-
sprockets (~> 2.
|
18
|
-
activemodel (3.
|
19
|
-
activesupport (= 3.
|
16
|
+
sprockets (~> 2.1.2)
|
17
|
+
activemodel (3.2.3)
|
18
|
+
activesupport (= 3.2.3)
|
20
19
|
builder (~> 3.0.0)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
arel (~> 2.2.3)
|
20
|
+
activerecord (3.2.3)
|
21
|
+
activemodel (= 3.2.3)
|
22
|
+
activesupport (= 3.2.3)
|
23
|
+
arel (~> 3.0.2)
|
26
24
|
tzinfo (~> 0.3.29)
|
27
|
-
activeresource (3.
|
28
|
-
activemodel (= 3.
|
29
|
-
activesupport (= 3.
|
30
|
-
activesupport (3.
|
25
|
+
activeresource (3.2.3)
|
26
|
+
activemodel (= 3.2.3)
|
27
|
+
activesupport (= 3.2.3)
|
28
|
+
activesupport (3.2.3)
|
29
|
+
i18n (~> 0.6)
|
31
30
|
multi_json (~> 1.0)
|
32
|
-
arel (
|
31
|
+
arel (3.0.2)
|
33
32
|
builder (3.0.0)
|
34
33
|
coderay (1.0.6)
|
35
34
|
diff-lcs (1.1.3)
|
@@ -45,8 +44,9 @@ GEM
|
|
45
44
|
git (>= 1.2.5)
|
46
45
|
rake
|
47
46
|
rdoc
|
47
|
+
journey (1.0.3)
|
48
48
|
json (1.6.6)
|
49
|
-
mail (2.
|
49
|
+
mail (2.4.4)
|
50
50
|
i18n (>= 0.4.0)
|
51
51
|
mime-types (~> 1.16)
|
52
52
|
treetop (~> 1.4.8)
|
@@ -61,26 +61,24 @@ GEM
|
|
61
61
|
coderay (~> 1.0.5)
|
62
62
|
method_source (~> 0.7.1)
|
63
63
|
slop (>= 2.4.4, < 3)
|
64
|
-
rack (1.
|
64
|
+
rack (1.4.1)
|
65
65
|
rack-cache (1.2)
|
66
66
|
rack (>= 0.4)
|
67
|
-
rack-mount (0.8.3)
|
68
|
-
rack (>= 1.0.0)
|
69
67
|
rack-ssl (1.3.2)
|
70
68
|
rack
|
71
69
|
rack-test (0.6.1)
|
72
70
|
rack (>= 1.0)
|
73
|
-
rails (3.
|
74
|
-
actionmailer (= 3.
|
75
|
-
actionpack (= 3.
|
76
|
-
activerecord (= 3.
|
77
|
-
activeresource (= 3.
|
78
|
-
activesupport (= 3.
|
71
|
+
rails (3.2.3)
|
72
|
+
actionmailer (= 3.2.3)
|
73
|
+
actionpack (= 3.2.3)
|
74
|
+
activerecord (= 3.2.3)
|
75
|
+
activeresource (= 3.2.3)
|
76
|
+
activesupport (= 3.2.3)
|
79
77
|
bundler (~> 1.0)
|
80
|
-
railties (= 3.
|
81
|
-
railties (3.
|
82
|
-
actionpack (= 3.
|
83
|
-
activesupport (= 3.
|
78
|
+
railties (= 3.2.3)
|
79
|
+
railties (3.2.3)
|
80
|
+
actionpack (= 3.2.3)
|
81
|
+
activesupport (= 3.2.3)
|
84
82
|
rack-ssl (~> 1.3.2)
|
85
83
|
rake (>= 0.8.7)
|
86
84
|
rdoc (~> 3.4)
|
@@ -102,7 +100,7 @@ GEM
|
|
102
100
|
railties (>= 3.0)
|
103
101
|
rspec (~> 2.8.0)
|
104
102
|
slop (2.4.4)
|
105
|
-
sprockets (2.
|
103
|
+
sprockets (2.1.2)
|
106
104
|
hike (~> 1.2)
|
107
105
|
rack (~> 1.0)
|
108
106
|
tilt (~> 1.1, != 1.3.0)
|
@@ -123,7 +121,7 @@ DEPENDENCIES
|
|
123
121
|
jeweler (~> 1.8.3)
|
124
122
|
mocha
|
125
123
|
pry
|
126
|
-
rails (
|
124
|
+
rails (>= 3.0.0)
|
127
125
|
rdoc (~> 3.12)
|
128
126
|
rspec (~> 2.8.0)
|
129
127
|
rspec-rails
|
data/README.markdown
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Object Daddy
|
2
2
|
============
|
3
|
-
_Version 1.0.
|
3
|
+
_Version 1.0.1 (April 8, 2012)_
|
4
4
|
|
5
5
|
__Authors:__ [Rick Bradley](mailto:blogicx@rickbradley.com), [Yossef Mendelssohn](mailto:ymendel@pobox.com), [Jeremy Holland](mailto:jeremy@jeremypholland.com)
|
6
6
|
|
@@ -16,11 +16,18 @@ of ActiveRecord models. It is a descendent of the "Object Mother" pattern for
|
|
16
16
|
creating objects for testing, and is related to the concept of an "object
|
17
17
|
exemplar" or _stereotype_.
|
18
18
|
|
19
|
-
**WARNING** This code is very much at an _alpha_ development stage. Usage, APIs,
|
20
|
-
etc., are all subject to change.
|
21
|
-
|
22
19
|
See [http://b.logi.cx/2007/11/26/object-daddy](http://b.logi.cx/2007/11/26/object-daddy) for inspiration, historical drama, and too much reading.
|
23
20
|
|
21
|
+
## Compatibility
|
22
|
+
|
23
|
+
Object Daddy does not require Rails/ActiveRecord in order to be of use, but should you be doing so, be aware that
|
24
|
+
this gem is compatible only with Rails >= 3.0.0. It has been tested with the following versions, but should be
|
25
|
+
perfectly compatible with all corresponding minor releases.
|
26
|
+
|
27
|
+
- Rails 3.0.12
|
28
|
+
- Rails 3.1.4
|
29
|
+
- Rails 3.2.3
|
30
|
+
|
24
31
|
## Installation
|
25
32
|
|
26
33
|
Add the following to your Gemfile and run `bundle install`
|
@@ -29,7 +36,7 @@ Add the following to your Gemfile and run `bundle install`
|
|
29
36
|
gem 'object-daddy'
|
30
37
|
end
|
31
38
|
|
32
|
-
Once installed, to set up your exemplars directory, run `rails g object-daddy`
|
39
|
+
Once installed, to set up your exemplars directory, run `rails g object-daddy` (if using with Rails)
|
33
40
|
|
34
41
|
## Using Object Daddy
|
35
42
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/object-daddy.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "object-daddy"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Rick Bradley", "Yossef Mendelssohn", "Jeremy Holland"]
|
12
|
-
s.date = "2012-04-
|
12
|
+
s.date = "2012-04-08"
|
13
13
|
s.description = "Object Daddy is a library (as well as a Ruby on Rails plugin) designed to assist in automating testing of large collections of objects, especially webs of ActiveRecord models. It is a descendent of the \"Object Mother\" pattern for creating objects for testing, and is related to the concept of an \"object exemplar\" or stereotype."
|
14
14
|
s.email = ["blogicx@rickbradley.com", "ymendel@pobox.com", "jeremy@jeremypholland.com"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -49,7 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
50
50
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
51
51
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
52
|
-
s.add_development_dependency(%q<rails>, ["
|
52
|
+
s.add_development_dependency(%q<rails>, [">= 3.0.0"])
|
53
53
|
s.add_development_dependency(%q<generator_spec>, [">= 0"])
|
54
54
|
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
55
55
|
s.add_development_dependency(%q<rspec-rails>, [">= 0"])
|
@@ -60,7 +60,7 @@ Gem::Specification.new do |s|
|
|
60
60
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
61
61
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
62
62
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
63
|
-
s.add_dependency(%q<rails>, ["
|
63
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
64
64
|
s.add_dependency(%q<generator_spec>, [">= 0"])
|
65
65
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
66
66
|
s.add_dependency(%q<rspec-rails>, [">= 0"])
|
@@ -72,7 +72,7 @@ Gem::Specification.new do |s|
|
|
72
72
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
73
73
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
74
74
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
75
|
-
s.add_dependency(%q<rails>, ["
|
75
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
76
76
|
s.add_dependency(%q<generator_spec>, [">= 0"])
|
77
77
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
78
78
|
s.add_dependency(%q<rspec-rails>, [">= 0"])
|
data/spec/object_daddy_spec.rb
CHANGED
@@ -637,11 +637,11 @@ describe ObjectDaddy, "when integrated with Rails" do
|
|
637
637
|
it "should provide a means of generating and saving a class instance" do
|
638
638
|
Frobnitz.should respond_to(:generate)
|
639
639
|
end
|
640
|
-
|
640
|
+
|
641
641
|
it "should provide a means of generating and saving a class instance while raising exceptions" do
|
642
642
|
Frobnitz.should respond_to(:generate!)
|
643
643
|
end
|
644
|
-
|
644
|
+
|
645
645
|
describe "and a block is passed to generate" do
|
646
646
|
it "should yield the instance to the block" do
|
647
647
|
yielded_object = nil
|
data/spec/resources/schema
CHANGED
@@ -4,12 +4,14 @@ ActiveRecord::Schema.define(:version => 0) do
|
|
4
4
|
t.column :title, :string
|
5
5
|
t.column :foo_id, :integer
|
6
6
|
t.column :baz_id, :integer
|
7
|
+
t.column :bar_id, :integer
|
7
8
|
t.column :thing_id, :integer
|
8
9
|
t.column :splort_id, :integer
|
9
10
|
t.column :bangbang_id, :integer
|
10
11
|
t.column :wakka_id, :integer
|
11
12
|
t.column :blitblot_id, :integer
|
12
13
|
t.column :poolie_id, :integer
|
14
|
+
t.column :type, :string
|
13
15
|
end
|
14
16
|
|
15
17
|
create_table :foos, :force => true do |t|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: object-daddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-04-
|
14
|
+
date: 2012-04-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|
18
|
-
requirement: &
|
18
|
+
requirement: &8018520 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 2.8.0
|
24
24
|
type: :development
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *8018520
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
|
-
requirement: &
|
29
|
+
requirement: &8017440 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '3.12'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *8017440
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: bundler
|
40
|
-
requirement: &
|
40
|
+
requirement: &8016180 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: 1.0.0
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *8016180
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: jeweler
|
51
|
-
requirement: &
|
51
|
+
requirement: &8015000 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ~>
|
@@ -56,21 +56,21 @@ dependencies:
|
|
56
56
|
version: 1.8.3
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *8015000
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: rails
|
62
|
-
requirement: &
|
62
|
+
requirement: &8013880 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ! '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 3.
|
67
|
+
version: 3.0.0
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *8013880
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: generator_spec
|
73
|
-
requirement: &
|
73
|
+
requirement: &7968120 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: '0'
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *7968120
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: sqlite3
|
84
|
-
requirement: &
|
84
|
+
requirement: &7965560 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
@@ -89,10 +89,10 @@ dependencies:
|
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *7965560
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: rspec-rails
|
95
|
-
requirement: &
|
95
|
+
requirement: &7951280 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ! '>='
|
@@ -100,10 +100,10 @@ dependencies:
|
|
100
100
|
version: '0'
|
101
101
|
type: :development
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *7951280
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: pry
|
106
|
-
requirement: &
|
106
|
+
requirement: &7948900 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ! '>='
|
@@ -111,10 +111,10 @@ dependencies:
|
|
111
111
|
version: '0'
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *7948900
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: mocha
|
117
|
-
requirement: &
|
117
|
+
requirement: &7947260 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ! '>='
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
version: '0'
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *7947260
|
126
126
|
description: Object Daddy is a library (as well as a Ruby on Rails plugin) designed
|
127
127
|
to assist in automating testing of large collections of objects, especially webs
|
128
128
|
of ActiveRecord models. It is a descendent of the "Object Mother" pattern for creating
|
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash: -
|
172
|
+
hash: -2833934392762525252
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|