factory_girl_rails 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Appraisals CHANGED
@@ -1,5 +1,5 @@
1
1
  appraise "rails3.0" do
2
- gem "rails", "3.0.18"
2
+ gem "rails", "3.0.20"
3
3
  gem "sqlite3", ">= 1.3.4", platforms: :mri
4
4
  gem "activerecord-jdbcsqlite3-adapter", "~> 1.2.5", platforms: :jruby
5
5
  gem "minitest-rails"
@@ -9,7 +9,7 @@ appraise "rails3.0" do
9
9
  end
10
10
 
11
11
  appraise "rails3.1" do
12
- gem "rails", "3.1.9"
12
+ gem "rails", "3.1.10"
13
13
  gem "sass-rails"
14
14
  gem "coffee-rails"
15
15
  gem "uglifier"
@@ -22,7 +22,7 @@ appraise "rails3.1" do
22
22
  end
23
23
 
24
24
  appraise "rails3.2" do
25
- gem "rails", "3.2.10"
25
+ gem "rails", "3.2.11"
26
26
  gem "sass-rails"
27
27
  gem "coffee-rails"
28
28
  gem "uglifier"
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{factory_girl_rails}
3
- s.version = '4.2.0'
3
+ s.version = '4.2.1'
4
4
  s.authors = ["Joe Ferris"]
5
5
  s.email = %q{jferris@thoughtbot.com}
6
6
  s.homepage = "http://github.com/thoughtbot/factory_girl_rails"
@@ -17,6 +17,13 @@ Feature:
17
17
 
18
18
  Scenario: Using Factory Girl and Factory Girl Rails with RSpec should generate a factory file
19
19
  When I add "rspec-rails" as a dependency
20
+ And I configure the factories as:
21
+ """
22
+ config.generators do |g|
23
+ g.test_framework :rspec, fixture: true
24
+ g.fixture_replacement :factory_girl
25
+ end
26
+ """
20
27
  And I run `bundle install` with a clean environment
21
28
  Then the output should contain "rspec-rails"
22
29
  And I run `bundle exec rails generate model User name:string` with a clean environment
@@ -19,6 +19,14 @@ When /^I set the FactoryGirl :suffix option to "([^"]+)"$/ do |suffix|
19
19
 
20
20
  end
21
21
 
22
+ When /^I configure the factories as:$/ do |string|
23
+ append_to_file File.join('config', 'application.rb'), <<-END
24
+ class Testapp::Application
25
+ #{string}
26
+ end
27
+ END
28
+ end
29
+
22
30
  When /^I configure the factories directory as "([^"]+)"$/ do |factory_dir|
23
31
  append_to_file File.join('config', 'application.rb'), <<-END
24
32
  class Testapp::Application
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.0.18"
5
+ gem "rails", "3.0.20"
6
6
  gem "sqlite3", ">= 1.3.4", :platforms=>:mri
7
7
  gem "activerecord-jdbcsqlite3-adapter", "~> 1.2.5", :platforms=>:jruby
8
8
  gem "minitest-rails"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/joshuaclayton/dev/gems/factory_girl_rails
3
3
  specs:
4
- factory_girl_rails (4.2.0)
4
+ factory_girl_rails (4.2.1)
5
5
  factory_girl (~> 4.2.0)
6
6
  railties (>= 3.0.0)
7
7
 
@@ -9,12 +9,12 @@ GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
11
  abstract (1.0.0)
12
- actionmailer (3.0.18)
13
- actionpack (= 3.0.18)
12
+ actionmailer (3.0.20)
13
+ actionpack (= 3.0.20)
14
14
  mail (~> 2.2.19)
15
- actionpack (3.0.18)
16
- activemodel (= 3.0.18)
17
- activesupport (= 3.0.18)
15
+ actionpack (3.0.20)
16
+ activemodel (= 3.0.20)
17
+ activesupport (= 3.0.20)
18
18
  builder (~> 2.1.2)
19
19
  erubis (~> 2.6.6)
20
20
  i18n (~> 0.5.0)
@@ -22,19 +22,19 @@ GEM
22
22
  rack-mount (~> 0.6.14)
23
23
  rack-test (~> 0.5.7)
24
24
  tzinfo (~> 0.3.23)
25
- activemodel (3.0.18)
26
- activesupport (= 3.0.18)
25
+ activemodel (3.0.20)
26
+ activesupport (= 3.0.20)
27
27
  builder (~> 2.1.2)
28
28
  i18n (~> 0.5.0)
29
- activerecord (3.0.18)
30
- activemodel (= 3.0.18)
31
- activesupport (= 3.0.18)
29
+ activerecord (3.0.20)
30
+ activemodel (= 3.0.20)
31
+ activesupport (= 3.0.20)
32
32
  arel (~> 2.0.10)
33
33
  tzinfo (~> 0.3.23)
34
- activeresource (3.0.18)
35
- activemodel (= 3.0.18)
36
- activesupport (= 3.0.18)
37
- activesupport (3.0.18)
34
+ activeresource (3.0.20)
35
+ activemodel (= 3.0.20)
36
+ activesupport (= 3.0.20)
37
+ activesupport (3.0.20)
38
38
  appraisal (0.5.1)
39
39
  bundler
40
40
  rake
@@ -44,7 +44,7 @@ GEM
44
44
  cucumber (>= 1.1.1)
45
45
  rspec-expectations (>= 2.7.0)
46
46
  builder (2.1.2)
47
- childprocess (0.3.6)
47
+ childprocess (0.3.7)
48
48
  ffi (~> 1.0, >= 1.0.6)
49
49
  cucumber (1.2.1)
50
50
  builder (>= 2.1.2)
@@ -57,10 +57,10 @@ GEM
57
57
  factory_girl (4.2.0)
58
58
  activesupport (>= 3.0.0)
59
59
  ffi (1.3.1)
60
- gherkin (2.11.5)
61
- json (>= 1.4.6)
60
+ gherkin (2.11.6)
61
+ json (>= 1.7.6)
62
62
  i18n (0.5.0)
63
- jquery-rails (2.1.4)
63
+ jquery-rails (2.2.0)
64
64
  railties (>= 3.0, < 5.0)
65
65
  thor (>= 0.14, < 2.0)
66
66
  json (1.7.6)
@@ -80,17 +80,17 @@ GEM
80
80
  rack (>= 1.0.0)
81
81
  rack-test (0.5.7)
82
82
  rack (>= 1.0)
83
- rails (3.0.18)
84
- actionmailer (= 3.0.18)
85
- actionpack (= 3.0.18)
86
- activerecord (= 3.0.18)
87
- activeresource (= 3.0.18)
88
- activesupport (= 3.0.18)
83
+ rails (3.0.20)
84
+ actionmailer (= 3.0.20)
85
+ actionpack (= 3.0.20)
86
+ activerecord (= 3.0.20)
87
+ activeresource (= 3.0.20)
88
+ activesupport (= 3.0.20)
89
89
  bundler (~> 1.0)
90
- railties (= 3.0.18)
91
- railties (3.0.18)
92
- actionpack (= 3.0.18)
93
- activesupport (= 3.0.18)
90
+ railties (= 3.0.20)
91
+ railties (3.0.20)
92
+ actionpack (= 3.0.20)
93
+ activesupport (= 3.0.20)
94
94
  rake (>= 0.8.7)
95
95
  rdoc (~> 3.4)
96
96
  thor (~> 0.14.4)
@@ -131,7 +131,7 @@ DEPENDENCIES
131
131
  factory_girl_rails!
132
132
  jquery-rails
133
133
  minitest-rails
134
- rails (= 3.0.18)
134
+ rails (= 3.0.20)
135
135
  rake
136
136
  rspec (~> 2.11.0)
137
137
  rspec-rails
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.1.9"
5
+ gem "rails", "3.1.10"
6
6
  gem "sass-rails"
7
7
  gem "coffee-rails"
8
8
  gem "uglifier"
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: /Users/joshuaclayton/dev/gems/factory_girl_rails
3
3
  specs:
4
- factory_girl_rails (4.2.0)
4
+ factory_girl_rails (4.2.1)
5
5
  factory_girl (~> 4.2.0)
6
6
  railties (>= 3.0.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (3.1.9)
12
- actionpack (= 3.1.9)
11
+ actionmailer (3.1.10)
12
+ actionpack (= 3.1.10)
13
13
  mail (~> 2.3.3)
14
- actionpack (3.1.9)
15
- activemodel (= 3.1.9)
16
- activesupport (= 3.1.9)
14
+ actionpack (3.1.10)
15
+ activemodel (= 3.1.10)
16
+ activesupport (= 3.1.10)
17
17
  builder (~> 3.0.0)
18
18
  erubis (~> 2.7.0)
19
19
  i18n (~> 0.6)
@@ -22,19 +22,19 @@ GEM
22
22
  rack-mount (~> 0.8.2)
23
23
  rack-test (~> 0.6.1)
24
24
  sprockets (~> 2.0.4)
25
- activemodel (3.1.9)
26
- activesupport (= 3.1.9)
25
+ activemodel (3.1.10)
26
+ activesupport (= 3.1.10)
27
27
  builder (~> 3.0.0)
28
28
  i18n (~> 0.6)
29
- activerecord (3.1.9)
30
- activemodel (= 3.1.9)
31
- activesupport (= 3.1.9)
29
+ activerecord (3.1.10)
30
+ activemodel (= 3.1.10)
31
+ activesupport (= 3.1.10)
32
32
  arel (~> 2.2.3)
33
33
  tzinfo (~> 0.3.29)
34
- activeresource (3.1.9)
35
- activemodel (= 3.1.9)
36
- activesupport (= 3.1.9)
37
- activesupport (3.1.9)
34
+ activeresource (3.1.10)
35
+ activemodel (= 3.1.10)
36
+ activesupport (= 3.1.10)
37
+ activesupport (3.1.10)
38
38
  multi_json (>= 1.0, < 1.3)
39
39
  appraisal (0.5.1)
40
40
  bundler
@@ -45,7 +45,7 @@ GEM
45
45
  cucumber (>= 1.1.1)
46
46
  rspec-expectations (>= 2.7.0)
47
47
  builder (3.0.4)
48
- childprocess (0.3.6)
48
+ childprocess (0.3.7)
49
49
  ffi (~> 1.0, >= 1.0.6)
50
50
  coffee-rails (3.1.1)
51
51
  coffee-script (>= 2.2.0)
@@ -66,11 +66,11 @@ GEM
66
66
  factory_girl (4.2.0)
67
67
  activesupport (>= 3.0.0)
68
68
  ffi (1.3.1)
69
- gherkin (2.11.5)
70
- json (>= 1.4.6)
69
+ gherkin (2.11.6)
70
+ json (>= 1.7.6)
71
71
  hike (1.2.1)
72
72
  i18n (0.6.1)
73
- jquery-rails (2.1.4)
73
+ jquery-rails (2.2.0)
74
74
  railties (>= 3.0, < 5.0)
75
75
  thor (>= 0.14, < 2.0)
76
76
  json (1.7.6)
@@ -90,21 +90,21 @@ GEM
90
90
  rack (>= 0.4)
91
91
  rack-mount (0.8.3)
92
92
  rack (>= 1.0.0)
93
- rack-ssl (1.3.2)
93
+ rack-ssl (1.3.3)
94
94
  rack
95
95
  rack-test (0.6.2)
96
96
  rack (>= 1.0)
97
- rails (3.1.9)
98
- actionmailer (= 3.1.9)
99
- actionpack (= 3.1.9)
100
- activerecord (= 3.1.9)
101
- activeresource (= 3.1.9)
102
- activesupport (= 3.1.9)
97
+ rails (3.1.10)
98
+ actionmailer (= 3.1.10)
99
+ actionpack (= 3.1.10)
100
+ activerecord (= 3.1.10)
101
+ activeresource (= 3.1.10)
102
+ activesupport (= 3.1.10)
103
103
  bundler (~> 1.0)
104
- railties (= 3.1.9)
105
- railties (3.1.9)
106
- actionpack (= 3.1.9)
107
- activesupport (= 3.1.9)
104
+ railties (= 3.1.10)
105
+ railties (3.1.10)
106
+ actionpack (= 3.1.10)
107
+ activesupport (= 3.1.10)
108
108
  rack-ssl (~> 1.3.2)
109
109
  rake (>= 0.8.7)
110
110
  rdoc (~> 3.4)
@@ -161,7 +161,7 @@ DEPENDENCIES
161
161
  factory_girl_rails!
162
162
  jquery-rails
163
163
  minitest-rails
164
- rails (= 3.1.9)
164
+ rails (= 3.1.10)
165
165
  rake
166
166
  rspec (~> 2.11.0)
167
167
  rspec-rails
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.2.10"
5
+ gem "rails", "3.2.11"
6
6
  gem "sass-rails"
7
7
  gem "coffee-rails"
8
8
  gem "uglifier"
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: /Users/joshuaclayton/dev/gems/factory_girl_rails
3
3
  specs:
4
- factory_girl_rails (4.2.0)
4
+ factory_girl_rails (4.2.1)
5
5
  factory_girl (~> 4.2.0)
6
6
  railties (>= 3.0.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (3.2.10)
12
- actionpack (= 3.2.10)
11
+ actionmailer (3.2.11)
12
+ actionpack (= 3.2.11)
13
13
  mail (~> 2.4.4)
14
- actionpack (3.2.10)
15
- activemodel (= 3.2.10)
16
- activesupport (= 3.2.10)
14
+ actionpack (3.2.11)
15
+ activemodel (= 3.2.11)
16
+ activesupport (= 3.2.11)
17
17
  builder (~> 3.0.0)
18
18
  erubis (~> 2.7.0)
19
19
  journey (~> 1.0.4)
@@ -21,18 +21,18 @@ GEM
21
21
  rack-cache (~> 1.2)
22
22
  rack-test (~> 0.6.1)
23
23
  sprockets (~> 2.2.1)
24
- activemodel (3.2.10)
25
- activesupport (= 3.2.10)
24
+ activemodel (3.2.11)
25
+ activesupport (= 3.2.11)
26
26
  builder (~> 3.0.0)
27
- activerecord (3.2.10)
28
- activemodel (= 3.2.10)
29
- activesupport (= 3.2.10)
27
+ activerecord (3.2.11)
28
+ activemodel (= 3.2.11)
29
+ activesupport (= 3.2.11)
30
30
  arel (~> 3.0.2)
31
31
  tzinfo (~> 0.3.29)
32
- activeresource (3.2.10)
33
- activemodel (= 3.2.10)
34
- activesupport (= 3.2.10)
35
- activesupport (3.2.10)
32
+ activeresource (3.2.11)
33
+ activemodel (= 3.2.11)
34
+ activesupport (= 3.2.11)
35
+ activesupport (3.2.11)
36
36
  i18n (~> 0.6)
37
37
  multi_json (~> 1.0)
38
38
  appraisal (0.5.1)
@@ -44,7 +44,7 @@ GEM
44
44
  cucumber (>= 1.1.1)
45
45
  rspec-expectations (>= 2.7.0)
46
46
  builder (3.0.4)
47
- childprocess (0.3.6)
47
+ childprocess (0.3.7)
48
48
  ffi (~> 1.0, >= 1.0.6)
49
49
  coffee-rails (3.2.2)
50
50
  coffee-script (>= 2.2.0)
@@ -65,12 +65,12 @@ GEM
65
65
  factory_girl (4.2.0)
66
66
  activesupport (>= 3.0.0)
67
67
  ffi (1.3.1)
68
- gherkin (2.11.5)
69
- json (>= 1.4.6)
68
+ gherkin (2.11.6)
69
+ json (>= 1.7.6)
70
70
  hike (1.2.1)
71
71
  i18n (0.6.1)
72
72
  journey (1.0.4)
73
- jquery-rails (2.1.4)
73
+ jquery-rails (2.2.0)
74
74
  railties (>= 3.0, < 5.0)
75
75
  thor (>= 0.14, < 2.0)
76
76
  json (1.7.6)
@@ -88,21 +88,21 @@ GEM
88
88
  rack (1.4.4)
89
89
  rack-cache (1.2)
90
90
  rack (>= 0.4)
91
- rack-ssl (1.3.2)
91
+ rack-ssl (1.3.3)
92
92
  rack
93
93
  rack-test (0.6.2)
94
94
  rack (>= 1.0)
95
- rails (3.2.10)
96
- actionmailer (= 3.2.10)
97
- actionpack (= 3.2.10)
98
- activerecord (= 3.2.10)
99
- activeresource (= 3.2.10)
100
- activesupport (= 3.2.10)
95
+ rails (3.2.11)
96
+ actionmailer (= 3.2.11)
97
+ actionpack (= 3.2.11)
98
+ activerecord (= 3.2.11)
99
+ activeresource (= 3.2.11)
100
+ activesupport (= 3.2.11)
101
101
  bundler (~> 1.0)
102
- railties (= 3.2.10)
103
- railties (3.2.10)
104
- actionpack (= 3.2.10)
105
- activesupport (= 3.2.10)
102
+ railties (= 3.2.11)
103
+ railties (3.2.11)
104
+ actionpack (= 3.2.11)
105
+ activesupport (= 3.2.11)
106
106
  rack-ssl (~> 1.3.2)
107
107
  rake (>= 0.8.7)
108
108
  rdoc (~> 3.4)
@@ -137,7 +137,7 @@ GEM
137
137
  therubyrhino (2.0.2)
138
138
  therubyrhino_jar (>= 1.7.3)
139
139
  therubyrhino_jar (1.7.4)
140
- thor (0.16.0)
140
+ thor (0.17.0)
141
141
  tilt (1.3.3)
142
142
  treetop (1.4.12)
143
143
  polyglot
@@ -159,7 +159,7 @@ DEPENDENCIES
159
159
  factory_girl_rails!
160
160
  jquery-rails
161
161
  minitest-rails
162
- rails (= 3.2.10)
162
+ rails (= 3.2.11)
163
163
  rake
164
164
  rspec (~> 2.11.0)
165
165
  rspec-rails
@@ -9,8 +9,12 @@ module FactoryGirl
9
9
  rails_options = generators.options[:rails]
10
10
 
11
11
  if rails_options[:test_framework] == :rspec
12
- if !rails_options.has_key?(:fixture_replacement)
13
- generators.fixture_replacement :factory_girl, :dir => 'spec/factories'
12
+ factory_girl_dir = generators.options.fetch(:factory_girl, { :dir => 'spec/factories' })[:dir]
13
+
14
+ if rails_options.has_key?(:fixture_replacement)
15
+ generators.fixture_replacement rails_options[:fixture_replacement], :dir => factory_girl_dir
16
+ else
17
+ generators.fixture_replacement :factory_girl, :dir => factory_girl_dir
14
18
  end
15
19
  else
16
20
  generators.test_framework rails_options[:test_framework], :fixture => false, :fixture_replacement => :factory_girl
@@ -19,9 +23,9 @@ module FactoryGirl
19
23
 
20
24
  initializer "factory_girl.set_factory_paths" do
21
25
  FactoryGirl.definition_file_paths = [
22
- File.join(Rails.root, 'factories'),
23
- File.join(Rails.root, 'test', 'factories'),
24
- File.join(Rails.root, 'spec', 'factories')
26
+ Rails.root.join('factories'),
27
+ Rails.root.join('test', 'factories'),
28
+ Rails.root.join('spec', 'factories')
25
29
  ]
26
30
  end
27
31
 
@@ -1,4 +1,5 @@
1
1
  require 'generators/factory_girl'
2
+ require 'factory_girl_rails'
2
3
 
3
4
  module FactoryGirl
4
5
  module Generators
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_girl_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
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: 2013-01-25 00:00:00.000000000 Z
12
+ date: 2013-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -194,3 +194,4 @@ test_files:
194
194
  - gemfiles/rails3.1.gemfile.lock
195
195
  - gemfiles/rails3.2.gemfile
196
196
  - gemfiles/rails3.2.gemfile.lock
197
+ has_rdoc: