factory_girl 3.1.1 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.simplecov +4 -0
- data/GETTING_STARTED.md +147 -3
- data/Gemfile.lock +1 -1
- data/NEWS +8 -0
- data/features/support/env.rb +0 -1
- data/gemfiles/3.0.gemfile.lock +1 -1
- data/gemfiles/3.1.gemfile.lock +1 -1
- data/gemfiles/3.2.gemfile.lock +1 -1
- data/lib/factory_girl.rb +50 -7
- data/lib/factory_girl/attribute.rb +1 -1
- data/lib/factory_girl/attribute/association.rb +1 -1
- data/lib/factory_girl/attribute/dynamic.rb +1 -1
- data/lib/factory_girl/attribute/sequence.rb +1 -1
- data/lib/factory_girl/attribute/static.rb +1 -1
- data/lib/factory_girl/attribute_assigner.rb +12 -3
- data/lib/factory_girl/callback.rb +4 -1
- data/lib/factory_girl/{callback_runner.rb → callbacks_observer.rb} +1 -1
- data/lib/factory_girl/definition.rb +1 -1
- data/lib/factory_girl/definition_proxy.rb +4 -0
- data/lib/factory_girl/disallows_duplicates_registry.rb +17 -0
- data/lib/factory_girl/evaluator.rb +14 -11
- data/lib/factory_girl/factory.rb +5 -5
- data/lib/factory_girl/null_object.rb +14 -2
- data/lib/factory_girl/registry.rb +15 -23
- data/lib/factory_girl/reload.rb +2 -0
- data/lib/factory_girl/strategy_calculator.rb +1 -5
- data/lib/factory_girl/syntax.rb +1 -0
- data/lib/factory_girl/syntax/blueprint.rb +1 -0
- data/lib/factory_girl/syntax/generate.rb +6 -3
- data/lib/factory_girl/syntax/make.rb +4 -2
- data/lib/factory_girl/syntax/methods.rb +0 -81
- data/lib/factory_girl/syntax/sham.rb +1 -0
- data/lib/factory_girl/syntax/vintage.rb +0 -2
- data/lib/factory_girl/syntax_runner.rb +5 -0
- data/lib/factory_girl/version.rb +1 -1
- data/spec/acceptance/activesupport_instrumentation_spec.rb +49 -0
- data/spec/acceptance/build_stubbed_spec.rb +6 -6
- data/spec/acceptance/initialize_with_spec.rb +26 -0
- data/spec/acceptance/modify_factories_spec.rb +2 -2
- data/spec/acceptance/register_strategies_spec.rb +120 -0
- data/spec/acceptance/skip_create_spec.rb +19 -0
- data/spec/acceptance/syntax/blueprint_spec.rb +2 -0
- data/spec/acceptance/syntax/generate_spec.rb +2 -0
- data/spec/acceptance/syntax/make_spec.rb +2 -0
- data/spec/acceptance/syntax/vintage_spec.rb +2 -2
- data/spec/acceptance/syntax_methods_within_dynamic_attributes_spec.rb +41 -0
- data/spec/factory_girl/attribute/dynamic_spec.rb +6 -6
- data/spec/factory_girl/attribute_list_spec.rb +4 -4
- data/spec/factory_girl/callback_spec.rb +7 -7
- data/spec/factory_girl/definition_proxy_spec.rb +6 -6
- data/spec/factory_girl/disallows_duplicates_registry_spec.rb +44 -0
- data/spec/factory_girl/evaluator_class_definer_spec.rb +5 -5
- data/spec/factory_girl/factory_spec.rb +3 -3
- data/spec/factory_girl/null_object_spec.rb +18 -4
- data/spec/factory_girl/registry_spec.rb +30 -72
- data/spec/factory_girl/sequence_spec.rb +3 -2
- data/spec/factory_girl/strategy_calculator_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- metadata +41 -28
@@ -0,0 +1,44 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe FactoryGirl::DisallowsDuplicatesRegistry do
|
4
|
+
let(:registry) { stub("registry", name: "Great thing", register: true, find: true, each: true, clear: true, registered?: true, :[] => true) }
|
5
|
+
|
6
|
+
subject { FactoryGirl::DisallowsDuplicatesRegistry.new(registry) }
|
7
|
+
|
8
|
+
it "delegates #each to the registry" do
|
9
|
+
block = -> {}
|
10
|
+
subject.each(block)
|
11
|
+
registry.should have_received(:each).with(block)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "delegates #registered? to the registry" do
|
15
|
+
subject.registered?(:great_name)
|
16
|
+
registry.should have_received(:registered?).with(:great_name)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "delegates #clear to the registry" do
|
20
|
+
subject.clear
|
21
|
+
registry.should have_received(:clear)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "delegates #find to the registry" do
|
25
|
+
subject.find(:awesome)
|
26
|
+
registry.should have_received(:find).with(:awesome)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "delegates #[] to the registry" do
|
30
|
+
subject[:awesome]
|
31
|
+
registry.should have_received(:[]).with(:awesome)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "delegates #register to the registry when not registered" do
|
35
|
+
registry.stubs(registered?: false)
|
36
|
+
subject.register(:awesome, {})
|
37
|
+
registry.should have_received(:register).with(:awesome, {})
|
38
|
+
end
|
39
|
+
|
40
|
+
it "raises when attempting to #register a previously registered strategy" do
|
41
|
+
expect { subject.register(:same_name, {}) }.
|
42
|
+
to raise_error(FactoryGirl::DuplicateDefinitionError, "Great thing already registered: same_name")
|
43
|
+
end
|
44
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe FactoryGirl::EvaluatorClassDefiner do
|
4
|
-
let(:simple_attribute) { stub("simple attribute", name: :simple, to_proc:
|
5
|
-
let(:relative_attribute) { stub("relative attribute", name: :relative, to_proc:
|
6
|
-
let(:attribute_that_raises_a_second_time) { stub("attribute that would raise without a cache", name: :raises_without_proper_cache, to_proc:
|
4
|
+
let(:simple_attribute) { stub("simple attribute", name: :simple, to_proc: -> { 1 }) }
|
5
|
+
let(:relative_attribute) { stub("relative attribute", name: :relative, to_proc: -> { simple + 1 }) }
|
6
|
+
let(:attribute_that_raises_a_second_time) { stub("attribute that would raise without a cache", name: :raises_without_proper_cache, to_proc: -> { raise "failed" if @run; @run = true; nil }) }
|
7
7
|
|
8
8
|
let(:attributes) { [simple_attribute, relative_attribute, attribute_that_raises_a_second_time] }
|
9
9
|
let(:class_definer) { FactoryGirl::EvaluatorClassDefiner.new(attributes, FactoryGirl::Evaluator) }
|
10
|
-
let(:evaluator) { class_definer.evaluator_class.new(stub("build strategy", add_observer: true)) }
|
10
|
+
let(:evaluator) { class_definer.evaluator_class.new(Object, stub("build strategy", add_observer: true)) }
|
11
11
|
|
12
12
|
it "returns an evaluator when accessing the evaluator class" do
|
13
13
|
evaluator.should be_a(FactoryGirl::Evaluator)
|
@@ -32,7 +32,7 @@ describe FactoryGirl::EvaluatorClassDefiner do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
context "with a custom evaluator as a parent class" do
|
35
|
-
let(:child_attributes) { [stub("child attribute", name: :simple, to_proc:
|
35
|
+
let(:child_attributes) { [stub("child attribute", name: :simple, to_proc: -> { 1 })] }
|
36
36
|
let(:child_definer) { FactoryGirl::EvaluatorClassDefiner.new(child_attributes, class_definer.evaluator_class) }
|
37
37
|
|
38
38
|
subject { child_definer.evaluator_class }
|
@@ -19,7 +19,7 @@ describe FactoryGirl::Factory do
|
|
19
19
|
it "passes a custom creation block" do
|
20
20
|
strategy = stub("strategy", result: nil, add_observer: true)
|
21
21
|
FactoryGirl::Strategy::Build.stubs(new: strategy)
|
22
|
-
block =
|
22
|
+
block = -> {}
|
23
23
|
factory = FactoryGirl::Factory.new(:object)
|
24
24
|
factory.to_create(&block)
|
25
25
|
|
@@ -69,7 +69,7 @@ describe FactoryGirl::Factory do
|
|
69
69
|
end
|
70
70
|
|
71
71
|
it "does not call a lazy attribute block for an overridden attribute" do
|
72
|
-
declaration = FactoryGirl::Declaration::Dynamic.new(@name, false,
|
72
|
+
declaration = FactoryGirl::Declaration::Dynamic.new(@name, false, -> { flunk })
|
73
73
|
@factory.declare_attribute(declaration)
|
74
74
|
@factory.run(FactoryGirl::Strategy::AttributesFor, @hash)
|
75
75
|
end
|
@@ -252,7 +252,7 @@ describe FactoryGirl::Factory, "running a factory" do
|
|
252
252
|
|
253
253
|
it "calls the block and returns the result" do
|
254
254
|
block_run = nil
|
255
|
-
block =
|
255
|
+
block = ->(result) { block_run = "changed" }
|
256
256
|
subject.run(FactoryGirl::Strategy::Build, { }, &block)
|
257
257
|
block_run.should == "changed"
|
258
258
|
end
|
@@ -1,8 +1,22 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe FactoryGirl::NullObject do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
let(:methods_to_respond_to) { %w[id age name admin?] }
|
5
|
+
let(:methods_to_not_respond_to) { %w[email date_of_birth title] }
|
6
|
+
|
7
|
+
subject { FactoryGirl::NullObject.new(methods_to_respond_to) }
|
8
|
+
|
9
|
+
it "responds to the given methods" do
|
10
|
+
methods_to_respond_to.each do |method_name|
|
11
|
+
subject.__send__(method_name).should be_nil
|
12
|
+
subject.respond_to?(method_name).should be_true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
it "does not respond to other methods" do
|
17
|
+
methods_to_not_respond_to.each do |method_name|
|
18
|
+
expect { subject.__send__(method_name) }.to raise_error(NoMethodError)
|
19
|
+
subject.respond_to?(method_name).should be_false
|
20
|
+
end
|
21
|
+
end
|
8
22
|
end
|
@@ -1,102 +1,60 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe FactoryGirl::Registry do
|
4
|
-
let(:
|
5
|
-
let(:
|
6
|
-
let(:other_factory) { FactoryGirl::Factory.new(:string) }
|
7
|
-
let(:factory_with_aliases) { FactoryGirl::Factory.new(:string, aliases: aliases) }
|
8
|
-
let(:registry_name) { "Factory" }
|
4
|
+
let(:registered_object) { stub("registered object") }
|
5
|
+
let(:second_registered_object) { stub("second registered object") }
|
9
6
|
|
10
|
-
subject { FactoryGirl::Registry.new(
|
7
|
+
subject { FactoryGirl::Registry.new("Great thing") }
|
11
8
|
|
12
9
|
it { should be_kind_of(Enumerable) }
|
13
10
|
|
14
|
-
it "finds a registered
|
15
|
-
subject.
|
16
|
-
subject.find(
|
11
|
+
it "finds a registered object" do
|
12
|
+
subject.register(:object_name, registered_object)
|
13
|
+
subject.find(:object_name).should == registered_object
|
17
14
|
end
|
18
15
|
|
19
|
-
it "
|
20
|
-
|
16
|
+
it "finds a registered object with square brackets" do
|
17
|
+
subject.register(:object_name, registered_object)
|
18
|
+
subject[:object_name].should == registered_object
|
21
19
|
end
|
22
20
|
|
23
|
-
it "
|
24
|
-
subject.
|
21
|
+
it "raises when an object cannot be found" do
|
22
|
+
expect { subject.find(:object_name) }.to raise_error(ArgumentError, "Great thing not registered: object_name")
|
25
23
|
end
|
26
24
|
|
27
|
-
it "
|
28
|
-
subject.
|
29
|
-
subject.should be_registered(factory.name.to_sym)
|
25
|
+
it "adds and returns the object registered" do
|
26
|
+
subject.register(:object_name, registered_object).should == registered_object
|
30
27
|
end
|
31
28
|
|
32
|
-
it "knows that
|
33
|
-
subject.
|
34
|
-
subject.should be_registered(
|
29
|
+
it "knows that an object is registered by symbol" do
|
30
|
+
subject.register(:object_name, registered_object)
|
31
|
+
subject.should be_registered(:object_name)
|
35
32
|
end
|
36
33
|
|
37
|
-
it "knows that
|
38
|
-
subject.
|
39
|
-
|
40
|
-
|
41
|
-
it "can be accessed like a hash" do
|
42
|
-
subject.add(factory)
|
43
|
-
subject[factory.name].should == factory
|
44
|
-
end
|
45
|
-
|
46
|
-
it "iterates registered factories" do
|
47
|
-
subject.add(factory)
|
48
|
-
subject.add(other_factory)
|
49
|
-
subject.to_a.should =~ [factory, other_factory]
|
34
|
+
it "knows that an object is registered by string" do
|
35
|
+
subject.register(:object_name, registered_object)
|
36
|
+
subject.should be_registered("object_name")
|
50
37
|
end
|
51
38
|
|
52
|
-
it "
|
53
|
-
subject.
|
54
|
-
subject.add(factory_with_aliases)
|
55
|
-
subject.to_a.should =~ [factory, factory_with_aliases]
|
39
|
+
it "knows when an object is not registered" do
|
40
|
+
subject.should_not be_registered("bogus")
|
56
41
|
end
|
57
42
|
|
58
|
-
it "
|
59
|
-
|
60
|
-
|
43
|
+
it "iterates registered objects" do
|
44
|
+
subject.register(:first_object, registered_object)
|
45
|
+
subject.register(:second_object, second_registered_object)
|
46
|
+
subject.to_a.should == [registered_object, second_registered_object]
|
61
47
|
end
|
62
48
|
|
63
|
-
it "
|
64
|
-
subject.
|
65
|
-
|
66
|
-
|
67
|
-
end
|
49
|
+
it "does not include duplicate objects with registered under different names" do
|
50
|
+
subject.register(:first_object, registered_object)
|
51
|
+
subject.register(:second_object, registered_object)
|
52
|
+
subject.to_a.should == [registered_object]
|
68
53
|
end
|
69
54
|
|
70
55
|
it "clears registered factories" do
|
71
|
-
subject.
|
56
|
+
subject.register(:object_name, registered_object)
|
72
57
|
subject.clear
|
73
58
|
subject.count.should be_zero
|
74
59
|
end
|
75
60
|
end
|
76
|
-
|
77
|
-
describe FactoryGirl::Registry, "with sequences" do
|
78
|
-
let(:aliases) { [:sender, :receiver] }
|
79
|
-
let(:sequence) { FactoryGirl::Sequence.new(:email) { |n| "somebody#{n}@example.com" } }
|
80
|
-
let(:sequence_with_aliases) { FactoryGirl::Sequence.new(:email, aliases: aliases) { |n| "someone_else#{n}@example.com" } }
|
81
|
-
let(:registry_name) { "Sequence" }
|
82
|
-
|
83
|
-
subject { FactoryGirl::Registry.new(registry_name) }
|
84
|
-
|
85
|
-
it "registers an sequence" do
|
86
|
-
subject.add(sequence)
|
87
|
-
subject.find(:email).should == sequence
|
88
|
-
end
|
89
|
-
|
90
|
-
it "registers a sequence with aliases" do
|
91
|
-
subject.add(sequence_with_aliases)
|
92
|
-
|
93
|
-
subject.find(:email).should == sequence_with_aliases
|
94
|
-
subject.find(:sender).should == sequence_with_aliases
|
95
|
-
subject.find(:receiver).should == sequence_with_aliases
|
96
|
-
end
|
97
|
-
|
98
|
-
it "doesn't allow a duplicate name" do
|
99
|
-
expect { 2.times { subject.add(sequence_with_aliases) } }.
|
100
|
-
to raise_error(FactoryGirl::DuplicateDefinitionError, "Sequence already registered: email")
|
101
|
-
end
|
102
|
-
end
|
@@ -26,8 +26,9 @@ describe FactoryGirl::Sequence do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "a sequence with aliases using default value" do
|
29
|
-
subject
|
30
|
-
its(:next)
|
29
|
+
subject { FactoryGirl::Sequence.new(:test, aliases: [:alias, :other]) { |n| "=#{n}" } }
|
30
|
+
its(:next) { should == "=1" }
|
31
|
+
its(:names) { should == [:test, :alias, :other] }
|
31
32
|
|
32
33
|
describe "when incrementing" do
|
33
34
|
before { subject.next }
|
@@ -18,6 +18,6 @@ describe FactoryGirl::StrategyCalculator do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it "raises when passing a bogus strategy" do
|
21
|
-
expect { FactoryGirl::StrategyCalculator.new(:bogus_strategy).strategy }.to raise_error
|
21
|
+
expect { FactoryGirl::StrategyCalculator.new(:bogus_strategy).strategy }.to raise_error(ArgumentError, /bogus_strategy/)
|
22
22
|
end
|
23
23
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_girl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-04-
|
13
|
+
date: 2012-04-24 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
17
|
-
requirement: &
|
17
|
+
requirement: &70135979934020 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 3.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70135979934020
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &70135979933560 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70135979933560
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: cucumber
|
39
|
-
requirement: &
|
39
|
+
requirement: &70135979933100 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '1.1'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70135979933100
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: timecop
|
50
|
-
requirement: &
|
50
|
+
requirement: &70135979932720 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70135979932720
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: simplecov
|
61
|
-
requirement: &
|
61
|
+
requirement: &70135979932260 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70135979932260
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: aruba
|
72
|
-
requirement: &
|
72
|
+
requirement: &70135979931840 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70135979931840
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: mocha
|
83
|
-
requirement: &
|
83
|
+
requirement: &70135979931420 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70135979931420
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: bourne
|
94
|
-
requirement: &
|
94
|
+
requirement: &70135979931000 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70135979931000
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: appraisal
|
105
|
-
requirement: &
|
105
|
+
requirement: &70135968969860 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0.4'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70135968969860
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: sqlite3-ruby
|
116
|
-
requirement: &
|
116
|
+
requirement: &70135968969440 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70135968969440
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: yard
|
127
|
-
requirement: &
|
127
|
+
requirement: &70135968968980 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ! '>='
|
@@ -132,10 +132,10 @@ dependencies:
|
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *70135968968980
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: bluecloth
|
138
|
-
requirement: &
|
138
|
+
requirement: &70135968968560 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ! '>='
|
@@ -143,7 +143,7 @@ dependencies:
|
|
143
143
|
version: '0'
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
|
-
version_requirements: *
|
146
|
+
version_requirements: *70135968968560
|
147
147
|
description: ! "factory_girl provides a framework and DSL for defining and\n using
|
148
148
|
factories - less error-prone, more explicit, and\n all-around
|
149
149
|
easier to work with than fixtures."
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- .autotest
|
158
158
|
- .gitignore
|
159
159
|
- .rspec
|
160
|
+
- .simplecov
|
160
161
|
- .travis.yml
|
161
162
|
- .yardopts
|
162
163
|
- Appraisals
|
@@ -193,7 +194,7 @@ files:
|
|
193
194
|
- lib/factory_girl/attribute_assigner.rb
|
194
195
|
- lib/factory_girl/attribute_list.rb
|
195
196
|
- lib/factory_girl/callback.rb
|
196
|
-
- lib/factory_girl/
|
197
|
+
- lib/factory_girl/callbacks_observer.rb
|
197
198
|
- lib/factory_girl/declaration.rb
|
198
199
|
- lib/factory_girl/declaration/association.rb
|
199
200
|
- lib/factory_girl/declaration/dynamic.rb
|
@@ -202,6 +203,7 @@ files:
|
|
202
203
|
- lib/factory_girl/declaration_list.rb
|
203
204
|
- lib/factory_girl/definition.rb
|
204
205
|
- lib/factory_girl/definition_proxy.rb
|
206
|
+
- lib/factory_girl/disallows_duplicates_registry.rb
|
205
207
|
- lib/factory_girl/errors.rb
|
206
208
|
- lib/factory_girl/evaluation.rb
|
207
209
|
- lib/factory_girl/evaluator.rb
|
@@ -229,8 +231,10 @@ files:
|
|
229
231
|
- lib/factory_girl/syntax/methods.rb
|
230
232
|
- lib/factory_girl/syntax/sham.rb
|
231
233
|
- lib/factory_girl/syntax/vintage.rb
|
234
|
+
- lib/factory_girl/syntax_runner.rb
|
232
235
|
- lib/factory_girl/trait.rb
|
233
236
|
- lib/factory_girl/version.rb
|
237
|
+
- spec/acceptance/activesupport_instrumentation_spec.rb
|
234
238
|
- spec/acceptance/aliases_spec.rb
|
235
239
|
- spec/acceptance/attribute_aliases_spec.rb
|
236
240
|
- spec/acceptance/attribute_existing_on_object_spec.rb
|
@@ -252,13 +256,16 @@ files:
|
|
252
256
|
- spec/acceptance/nested_attributes_spec.rb
|
253
257
|
- spec/acceptance/overrides_spec.rb
|
254
258
|
- spec/acceptance/parent_spec.rb
|
259
|
+
- spec/acceptance/register_strategies_spec.rb
|
255
260
|
- spec/acceptance/sequence_spec.rb
|
261
|
+
- spec/acceptance/skip_create_spec.rb
|
256
262
|
- spec/acceptance/stub_spec.rb
|
257
263
|
- spec/acceptance/syntax/blueprint_spec.rb
|
258
264
|
- spec/acceptance/syntax/generate_spec.rb
|
259
265
|
- spec/acceptance/syntax/make_spec.rb
|
260
266
|
- spec/acceptance/syntax/sham_spec.rb
|
261
267
|
- spec/acceptance/syntax/vintage_spec.rb
|
268
|
+
- spec/acceptance/syntax_methods_within_dynamic_attributes_spec.rb
|
262
269
|
- spec/acceptance/traits_spec.rb
|
263
270
|
- spec/acceptance/transient_attributes_spec.rb
|
264
271
|
- spec/factory_girl/aliases_spec.rb
|
@@ -273,6 +280,7 @@ files:
|
|
273
280
|
- spec/factory_girl/declaration_list_spec.rb
|
274
281
|
- spec/factory_girl/definition_proxy_spec.rb
|
275
282
|
- spec/factory_girl/definition_spec.rb
|
283
|
+
- spec/factory_girl/disallows_duplicates_registry_spec.rb
|
276
284
|
- spec/factory_girl/evaluator_class_definer_spec.rb
|
277
285
|
- spec/factory_girl/factory_spec.rb
|
278
286
|
- spec/factory_girl/find_definitions_spec.rb
|
@@ -313,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
321
|
version: '0'
|
314
322
|
requirements: []
|
315
323
|
rubyforge_project:
|
316
|
-
rubygems_version: 1.8.
|
324
|
+
rubygems_version: 1.8.10
|
317
325
|
signing_key:
|
318
326
|
specification_version: 3
|
319
327
|
summary: factory_girl provides a framework and DSL for defining and using model instance
|
@@ -333,6 +341,7 @@ test_files:
|
|
333
341
|
- gemfiles/3.1.gemfile.lock
|
334
342
|
- gemfiles/3.2.gemfile
|
335
343
|
- gemfiles/3.2.gemfile.lock
|
344
|
+
- spec/acceptance/activesupport_instrumentation_spec.rb
|
336
345
|
- spec/acceptance/aliases_spec.rb
|
337
346
|
- spec/acceptance/attribute_aliases_spec.rb
|
338
347
|
- spec/acceptance/attribute_existing_on_object_spec.rb
|
@@ -354,13 +363,16 @@ test_files:
|
|
354
363
|
- spec/acceptance/nested_attributes_spec.rb
|
355
364
|
- spec/acceptance/overrides_spec.rb
|
356
365
|
- spec/acceptance/parent_spec.rb
|
366
|
+
- spec/acceptance/register_strategies_spec.rb
|
357
367
|
- spec/acceptance/sequence_spec.rb
|
368
|
+
- spec/acceptance/skip_create_spec.rb
|
358
369
|
- spec/acceptance/stub_spec.rb
|
359
370
|
- spec/acceptance/syntax/blueprint_spec.rb
|
360
371
|
- spec/acceptance/syntax/generate_spec.rb
|
361
372
|
- spec/acceptance/syntax/make_spec.rb
|
362
373
|
- spec/acceptance/syntax/sham_spec.rb
|
363
374
|
- spec/acceptance/syntax/vintage_spec.rb
|
375
|
+
- spec/acceptance/syntax_methods_within_dynamic_attributes_spec.rb
|
364
376
|
- spec/acceptance/traits_spec.rb
|
365
377
|
- spec/acceptance/transient_attributes_spec.rb
|
366
378
|
- spec/factory_girl/aliases_spec.rb
|
@@ -375,6 +387,7 @@ test_files:
|
|
375
387
|
- spec/factory_girl/declaration_list_spec.rb
|
376
388
|
- spec/factory_girl/definition_proxy_spec.rb
|
377
389
|
- spec/factory_girl/definition_spec.rb
|
390
|
+
- spec/factory_girl/disallows_duplicates_registry_spec.rb
|
378
391
|
- spec/factory_girl/evaluator_class_definer_spec.rb
|
379
392
|
- spec/factory_girl/factory_spec.rb
|
380
393
|
- spec/factory_girl/find_definitions_spec.rb
|