1) Person is valid
Failure/Error: Fabricate(:person)
ArgumentError:
wrong number of arguments (given 2, expected 0..1)
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/active_record.rb:8:in `build_instance'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:13:in `build'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:22:in `create'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:65:in `block in fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:64:in `instance_eval'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:64:in `fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/fabricator.rb:8:in `fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication.rb:49:in `Fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:144:in `block in generate_value'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:97:in `assign_field'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:92:in `assign'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:70:in `method_missing'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:112:in `block in process_attributes'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:109:in `each'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:109:in `process_attributes'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:6:in `build'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/generator/base.rb:22:in `create'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:65:in `block in fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:64:in `instance_eval'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/schematic/definition.rb:64:in `fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication/fabricator.rb:8:in `fabricate'
# /Users/wdcunha/.rvm/gems/ruby-2.5.0/gems/fabrication-2.2.3/lib/fabrication.rb:49:in `Fabricate'
# ./spec/models/person_spec.rb:8:in `block (2 levels) in <top (required)>'
# ./spec/models/person_spec.rb:12:in `block (2 levels) in <top (required)>'
2.5.0 :020 > p = Person.new(first_name: "Alice", last_name: "Smith", user_id: 1)
=> #<Person id: nil, first_name: "Alice", last_name: "Smith", created_at: nil, updated_at: nil, user_id: 1>
--
You received this message because you are subscribed to the Google Groups "fabrication" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricationge...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2.5.0 :030 > Fabricate(:person)
Traceback (most recent call last):
1: from (irb):30
ArgumentError (wrong number of arguments (given 2, expected 0..1))
To unsubscribe from this group and stop receiving emails from it, send an email to fabricationgem+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricationgem+unsubscribe@googlegroups.com.
Fetching fabrication 2.20.1 (was 2.2.3)
Installing fabrication 2.20.1 (was 2.2.3)
~/Development/JumpStartLab/contact_manager $ rspec spec/models/user_spec.rb
User
has associated people (FAILED - 1)
builds associated people
Failures:
1) User has associated people
Failure/Error: expect(user.people).to be_instance_of(Array)
expected #<ActiveRecord::Associations::CollectionProxy []> to be an instance of Array
# ./spec/models/user_spec.rb:10:in `block (2 levels) in <top (required)>'
Finished in 0.31834 seconds (files took 2.05 seconds to load)
2 examples, 1 failure
Failed examples:
rspec ./spec/models/user_spec.rb:9 # User has associated people
To unsubscribe from this group and stop receiving emails from it, send an email to fabricationgem+unsubscribe@googlegroups.com.