factory_girl 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ When /^"([^"]*)" is added to Factory Girl's file definitions path$/ do |file_nam
12
12
 
13
13
  append_file_to_factory_girl_definitions_path(new_factory_file)
14
14
 
15
- When %{I find definitions}
15
+ step %{I find definitions}
16
16
  end
17
17
 
18
18
  When /^"([^"]*)" is added to Factory Girl's file definitions path as an absolute path$/ do |file_name|
@@ -20,7 +20,7 @@ When /^"([^"]*)" is added to Factory Girl's file definitions path as an absolute
20
20
 
21
21
  append_file_to_factory_girl_definitions_path(new_factory_file)
22
22
 
23
- When %{I find definitions}
23
+ step %{I find definitions}
24
24
  end
25
25
 
26
26
  When /^I create a "([^"]*)" instance from Factory Girl$/ do |factory_name|
@@ -31,7 +31,7 @@ Given /^these super users exist:$/ do |table|
31
31
  headers = table.headers + ["admin"]
32
32
  rows = table.rows.map { |row| row + [true] }
33
33
  new_table = Cucumber::Ast::Table.new([headers] + rows)
34
- Given %{the following person exists:}, new_table
34
+ step %{the following person exists:}, new_table
35
35
  end
36
36
 
37
37
  When /^I find definitions$/ do
@@ -73,6 +73,23 @@ class SimpleColumn
73
73
  end
74
74
  end
75
75
 
76
+ class NamedAttributeModel
77
+ def self.attribute_names
78
+ %w(title)
79
+ end
80
+
81
+ attr_accessor :title
82
+
83
+ def save!
84
+ @@count ||= 0
85
+ @@count += 1
86
+ end
87
+
88
+ def self.count
89
+ @@count
90
+ end
91
+ end
92
+
76
93
  FactoryGirl.define do
77
94
  # To make sure the step defs work with an email
78
95
  sequence :email do |n|
@@ -113,6 +130,9 @@ FactoryGirl.define do
113
130
  # This is here to make FG work with ORMs that have `columns => [:name, :admin, :etc]` on the class (Neo4j)
114
131
  factory :simple_column do
115
132
  end
133
+
134
+ factory :named_attribute_model do
135
+ end
116
136
  end
117
137
 
118
138
  require 'factory_girl/step_definitions'
@@ -1,82 +1,85 @@
1
1
  PATH
2
2
  remote: /Users/joshuaclayton/dev/gems/factory_girl
3
3
  specs:
4
- factory_girl (3.0.0)
4
+ factory_girl (3.1.0)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activemodel (3.0.9)
11
- activesupport (= 3.0.9)
12
- builder (~> 2.1.2)
13
- i18n (~> 0.5.0)
14
- activerecord (3.0.9)
15
- activemodel (= 3.0.9)
16
- activesupport (= 3.0.9)
17
- arel (~> 2.0.10)
18
- tzinfo (~> 0.3.23)
19
- activesupport (3.0.9)
20
- appraisal (0.3.8)
10
+ activemodel (3.2.3)
11
+ activesupport (= 3.2.3)
12
+ builder (~> 3.0.0)
13
+ activerecord (3.2.3)
14
+ activemodel (= 3.2.3)
15
+ activesupport (= 3.2.3)
16
+ arel (~> 3.0.2)
17
+ tzinfo (~> 0.3.29)
18
+ activesupport (3.2.3)
19
+ i18n (~> 0.6)
20
+ multi_json (~> 1.0)
21
+ appraisal (0.4.1)
21
22
  bundler
22
23
  rake
23
- arel (2.0.10)
24
- aruba (0.3.7)
25
- childprocess (>= 0.1.9)
26
- cucumber (>= 0.10.5)
27
- rspec (>= 2.6.0)
28
- bluecloth (2.1.0)
29
- bourne (1.0)
30
- mocha (= 0.9.8)
31
- builder (2.1.2)
32
- childprocess (0.1.9)
24
+ arel (3.0.2)
25
+ aruba (0.4.11)
26
+ childprocess (>= 0.2.3)
27
+ cucumber (>= 1.1.1)
28
+ ffi (>= 1.0.11)
29
+ rspec (>= 2.7.0)
30
+ bluecloth (2.2.0)
31
+ bourne (1.1.2)
32
+ mocha (= 0.10.5)
33
+ builder (3.0.0)
34
+ childprocess (0.3.1)
33
35
  ffi (~> 1.0.6)
34
- cucumber (1.0.0)
36
+ cucumber (1.1.9)
35
37
  builder (>= 2.1.2)
36
38
  diff-lcs (>= 1.1.2)
37
- gherkin (~> 2.4.1)
39
+ gherkin (~> 2.9.0)
38
40
  json (>= 1.4.6)
39
- term-ansicolor (>= 1.0.5)
40
- diff-lcs (1.1.2)
41
- ffi (1.0.9)
42
- gherkin (2.4.1)
41
+ term-ansicolor (>= 1.0.6)
42
+ diff-lcs (1.1.3)
43
+ ffi (1.0.11)
44
+ gherkin (2.9.3)
43
45
  json (>= 1.4.6)
44
- i18n (0.5.0)
45
- json (1.5.3)
46
- mocha (0.9.8)
47
- rake
48
- multi_json (1.1.0)
49
- rake (0.9.2)
50
- rspec (2.6.0)
51
- rspec-core (~> 2.6.0)
52
- rspec-expectations (~> 2.6.0)
53
- rspec-mocks (~> 2.6.0)
54
- rspec-core (2.6.4)
55
- rspec-expectations (2.6.0)
56
- diff-lcs (~> 1.1.2)
57
- rspec-mocks (2.6.0)
46
+ i18n (0.6.0)
47
+ json (1.6.6)
48
+ metaclass (0.0.1)
49
+ mocha (0.10.5)
50
+ metaclass (~> 0.0.1)
51
+ multi_json (1.2.0)
52
+ rake (0.9.2.2)
53
+ rspec (2.9.0)
54
+ rspec-core (~> 2.9.0)
55
+ rspec-expectations (~> 2.9.0)
56
+ rspec-mocks (~> 2.9.0)
57
+ rspec-core (2.9.0)
58
+ rspec-expectations (2.9.1)
59
+ diff-lcs (~> 1.1.3)
60
+ rspec-mocks (2.9.0)
58
61
  simplecov (0.6.1)
59
62
  multi_json (~> 1.0)
60
63
  simplecov-html (~> 0.5.3)
61
64
  simplecov-html (0.5.3)
62
- sqlite3 (1.3.3)
65
+ sqlite3 (1.3.5)
63
66
  sqlite3-ruby (1.3.3)
64
67
  sqlite3 (>= 1.3.3)
65
- term-ansicolor (1.0.5)
68
+ term-ansicolor (1.0.7)
66
69
  timecop (0.3.5)
67
- tzinfo (0.3.28)
68
- yard (0.7.2)
70
+ tzinfo (0.3.32)
71
+ yard (0.7.5)
69
72
 
70
73
  PLATFORMS
71
74
  ruby
72
75
 
73
76
  DEPENDENCIES
74
77
  activerecord (~> 3.0)
75
- appraisal (~> 0.3.8)
78
+ appraisal (~> 0.4)
76
79
  aruba
77
80
  bluecloth
78
81
  bourne
79
- cucumber (~> 1.0.0)
82
+ cucumber (~> 1.1)
80
83
  factory_girl!
81
84
  mocha
82
85
  rspec (~> 2.0)
@@ -1,91 +1,85 @@
1
1
  PATH
2
2
  remote: /Users/joshuaclayton/dev/gems/factory_girl
3
3
  specs:
4
- factory_girl (3.0.0)
4
+ factory_girl (3.1.0)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activemodel (3.1.0)
11
- activesupport (= 3.1.0)
12
- bcrypt-ruby (~> 3.0.0)
10
+ activemodel (3.2.3)
11
+ activesupport (= 3.2.3)
13
12
  builder (~> 3.0.0)
14
- i18n (~> 0.6)
15
- activerecord (3.1.0)
16
- activemodel (= 3.1.0)
17
- activesupport (= 3.1.0)
18
- arel (~> 2.2.1)
13
+ activerecord (3.2.3)
14
+ activemodel (= 3.2.3)
15
+ activesupport (= 3.2.3)
16
+ arel (~> 3.0.2)
19
17
  tzinfo (~> 0.3.29)
20
- activesupport (3.1.0)
18
+ activesupport (3.2.3)
19
+ i18n (~> 0.6)
21
20
  multi_json (~> 1.0)
22
- appraisal (0.3.8)
21
+ appraisal (0.4.1)
23
22
  bundler
24
23
  rake
25
- arel (2.2.1)
26
- aruba (0.4.5)
27
- bcat (>= 0.6.1)
28
- childprocess (>= 0.1.9)
29
- cucumber (>= 0.10.7)
30
- rdiscount (>= 1.6.8)
31
- rspec (>= 2.6.0)
32
- bcat (0.6.1)
33
- rack (~> 1.0)
34
- bcrypt-ruby (3.0.0)
35
- bluecloth (2.1.0)
36
- bourne (1.0)
37
- mocha (= 0.9.8)
24
+ arel (3.0.2)
25
+ aruba (0.4.11)
26
+ childprocess (>= 0.2.3)
27
+ cucumber (>= 1.1.1)
28
+ ffi (>= 1.0.11)
29
+ rspec (>= 2.7.0)
30
+ bluecloth (2.2.0)
31
+ bourne (1.1.2)
32
+ mocha (= 0.10.5)
38
33
  builder (3.0.0)
39
- childprocess (0.2.1)
34
+ childprocess (0.3.1)
40
35
  ffi (~> 1.0.6)
41
- cucumber (1.0.2)
36
+ cucumber (1.1.9)
42
37
  builder (>= 2.1.2)
43
38
  diff-lcs (>= 1.1.2)
44
- gherkin (~> 2.4.5)
39
+ gherkin (~> 2.9.0)
45
40
  json (>= 1.4.6)
46
- term-ansicolor (>= 1.0.5)
41
+ term-ansicolor (>= 1.0.6)
47
42
  diff-lcs (1.1.3)
48
- ffi (1.0.9)
49
- gherkin (2.4.16)
43
+ ffi (1.0.11)
44
+ gherkin (2.9.3)
50
45
  json (>= 1.4.6)
51
46
  i18n (0.6.0)
52
- json (1.5.4)
53
- mocha (0.9.8)
54
- rake
55
- multi_json (1.0.3)
56
- rack (1.3.2)
57
- rake (0.9.2)
58
- rdiscount (1.6.8)
59
- rspec (2.6.0)
60
- rspec-core (~> 2.6.0)
61
- rspec-expectations (~> 2.6.0)
62
- rspec-mocks (~> 2.6.0)
63
- rspec-core (2.6.4)
64
- rspec-expectations (2.6.0)
65
- diff-lcs (~> 1.1.2)
66
- rspec-mocks (2.6.0)
47
+ json (1.6.6)
48
+ metaclass (0.0.1)
49
+ mocha (0.10.5)
50
+ metaclass (~> 0.0.1)
51
+ multi_json (1.2.0)
52
+ rake (0.9.2.2)
53
+ rspec (2.9.0)
54
+ rspec-core (~> 2.9.0)
55
+ rspec-expectations (~> 2.9.0)
56
+ rspec-mocks (~> 2.9.0)
57
+ rspec-core (2.9.0)
58
+ rspec-expectations (2.9.1)
59
+ diff-lcs (~> 1.1.3)
60
+ rspec-mocks (2.9.0)
67
61
  simplecov (0.6.1)
68
62
  multi_json (~> 1.0)
69
63
  simplecov-html (~> 0.5.3)
70
64
  simplecov-html (0.5.3)
71
- sqlite3 (1.3.4)
65
+ sqlite3 (1.3.5)
72
66
  sqlite3-ruby (1.3.3)
73
67
  sqlite3 (>= 1.3.3)
74
- term-ansicolor (1.0.6)
68
+ term-ansicolor (1.0.7)
75
69
  timecop (0.3.5)
76
- tzinfo (0.3.29)
77
- yard (0.7.2)
70
+ tzinfo (0.3.32)
71
+ yard (0.7.5)
78
72
 
79
73
  PLATFORMS
80
74
  ruby
81
75
 
82
76
  DEPENDENCIES
83
77
  activerecord (~> 3.1)
84
- appraisal (~> 0.3.8)
78
+ appraisal (~> 0.4)
85
79
  aruba
86
80
  bluecloth
87
81
  bourne
88
- cucumber (~> 1.0.0)
82
+ cucumber (~> 1.1)
89
83
  factory_girl!
90
84
  mocha
91
85
  rspec (~> 2.0)
@@ -1,67 +1,63 @@
1
1
  PATH
2
2
  remote: /Users/joshuaclayton/dev/gems/factory_girl
3
3
  specs:
4
- factory_girl (3.0.0)
4
+ factory_girl (3.1.0)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activemodel (3.2.0)
11
- activesupport (= 3.2.0)
10
+ activemodel (3.2.3)
11
+ activesupport (= 3.2.3)
12
12
  builder (~> 3.0.0)
13
- activerecord (3.2.0)
14
- activemodel (= 3.2.0)
15
- activesupport (= 3.2.0)
16
- arel (~> 3.0.0)
13
+ activerecord (3.2.3)
14
+ activemodel (= 3.2.3)
15
+ activesupport (= 3.2.3)
16
+ arel (~> 3.0.2)
17
17
  tzinfo (~> 0.3.29)
18
- activesupport (3.2.0)
18
+ activesupport (3.2.3)
19
19
  i18n (~> 0.6)
20
20
  multi_json (~> 1.0)
21
- appraisal (0.3.8)
21
+ appraisal (0.4.1)
22
22
  bundler
23
23
  rake
24
- arel (3.0.0)
25
- aruba (0.4.6)
26
- bcat (>= 0.6.1)
27
- childprocess (>= 0.2.0)
28
- cucumber (>= 1.0.2)
29
- rdiscount (>= 1.6.8)
30
- rspec (>= 2.6.0)
31
- bcat (0.6.2)
32
- rack (~> 1.0)
24
+ arel (3.0.2)
25
+ aruba (0.4.11)
26
+ childprocess (>= 0.2.3)
27
+ cucumber (>= 1.1.1)
28
+ ffi (>= 1.0.11)
29
+ rspec (>= 2.7.0)
33
30
  bluecloth (2.2.0)
34
- bourne (1.0)
35
- mocha (= 0.9.8)
31
+ bourne (1.1.2)
32
+ mocha (= 0.10.5)
36
33
  builder (3.0.0)
37
- childprocess (0.3.0)
34
+ childprocess (0.3.1)
38
35
  ffi (~> 1.0.6)
39
- cucumber (1.0.6)
36
+ cucumber (1.1.9)
40
37
  builder (>= 2.1.2)
41
38
  diff-lcs (>= 1.1.2)
42
- gherkin (~> 2.4.18)
39
+ gherkin (~> 2.9.0)
43
40
  json (>= 1.4.6)
44
41
  term-ansicolor (>= 1.0.6)
45
42
  diff-lcs (1.1.3)
46
43
  ffi (1.0.11)
47
- gherkin (2.4.21)
44
+ gherkin (2.9.3)
48
45
  json (>= 1.4.6)
49
46
  i18n (0.6.0)
50
- json (1.6.5)
51
- mocha (0.9.8)
52
- rake
53
- multi_json (1.0.4)
54
- rack (1.4.0)
47
+ json (1.6.6)
48
+ metaclass (0.0.1)
49
+ mocha (0.10.5)
50
+ metaclass (~> 0.0.1)
51
+ multi_json (1.2.0)
55
52
  rake (0.9.2.2)
56
- rdiscount (1.6.8)
57
- rspec (2.8.0)
58
- rspec-core (~> 2.8.0)
59
- rspec-expectations (~> 2.8.0)
60
- rspec-mocks (~> 2.8.0)
61
- rspec-core (2.8.0)
62
- rspec-expectations (2.8.0)
63
- diff-lcs (~> 1.1.2)
64
- rspec-mocks (2.8.0)
53
+ rspec (2.9.0)
54
+ rspec-core (~> 2.9.0)
55
+ rspec-expectations (~> 2.9.0)
56
+ rspec-mocks (~> 2.9.0)
57
+ rspec-core (2.9.0)
58
+ rspec-expectations (2.9.1)
59
+ diff-lcs (~> 1.1.3)
60
+ rspec-mocks (2.9.0)
65
61
  simplecov (0.6.1)
66
62
  multi_json (~> 1.0)
67
63
  simplecov-html (~> 0.5.3)
@@ -71,19 +67,19 @@ GEM
71
67
  sqlite3 (>= 1.3.3)
72
68
  term-ansicolor (1.0.7)
73
69
  timecop (0.3.5)
74
- tzinfo (0.3.31)
75
- yard (0.7.4)
70
+ tzinfo (0.3.32)
71
+ yard (0.7.5)
76
72
 
77
73
  PLATFORMS
78
74
  ruby
79
75
 
80
76
  DEPENDENCIES
81
77
  activerecord (~> 3.2)
82
- appraisal (~> 0.3.8)
78
+ appraisal (~> 0.4)
83
79
  aruba
84
80
  bluecloth
85
81
  bourne
86
- cucumber (~> 1.0.0)
82
+ cucumber (~> 1.1)
87
83
  factory_girl!
88
84
  mocha
89
85
  rspec (~> 2.0)