Skip to content

Instantly share code, notes, and snippets.

@ariejan
Created January 13, 2012 11:39
Show Gist options
  • Save ariejan/1605696 to your computer and use it in GitHub Desktop.
Save ariejan/1605696 to your computer and use it in GitHub Desktop.
1) Partnership as a relation between two people connects a person with a partner
Failure/Error: person = create(:person_parent, partner: partner)
ActiveRecord::RecordInvalid:
Validation failed: Person partnership cannot assign partner to a partner
# ./spec/models/partnership_spec.rb:13:in `block (3 levels) in <top (required)>'
2) Partnership as a relation between two people connects a partner with a customer_partner
Failure/Error: person = create(:person_parent, partner: partner)
ActiveRecord::RecordInvalid:
Validation failed: Person partnership cannot assign partner to a partner
# ./spec/models/partnership_spec.rb:20:in `block (3 levels) in <top (required)>'
3) Person scopes all_partners / all_customers customer should be recognized as one
Failure/Error: parents.first.is_customer?.should == true
expected: true
got: nil (using ==)
# ./spec/models/person_spec.rb:65:in `block (3 levels) in <top (required)>'
4) Person with a partner accepts nested attributes for the partner
Failure/Error: person.should have_partner
expected #has_partner? to return true, got false
# ./spec/models/person_spec.rb:161:in `block (3 levels) in <top (required)>'
5) Person with a partner accepts nested attributes for the customer partner
Failure/Error: partner.should have_customer_partner
NoMethodError:
undefined method `has_customer_partner?' for nil:NilClass
# ./spec/models/person_spec.rb:178:in `block (3 levels) in <top (required)>'
6) Dossiers show an individual dossier should download PDF document
Failure/Error: page.click_link 'All documents'
NoMethodError:
undefined method `franchisee' for nil:NilClass
# ./app/pdfs/dossier_pdf.rb:99:in `block in mediation_agreement_viaviela_parent'
# ./app/pdfs/dossier_pdf.rb:80:in `box_agreement'
# ./app/pdfs/dossier_pdf.rb:96:in `mediation_agreement_viaviela_parent'
# ./app/pdfs/dossier_pdf.rb:29:in `all_docs'
# ./app/pdfs/dossier_pdf.rb:15:in `initialize'
# ./app/controllers/dossiers_controller.rb:21:in `new'
# ./app/controllers/dossiers_controller.rb:21:in `block (2 levels) in show'
# ./app/controllers/dossiers_controller.rb:17:in `show'
# (eval):2:in `click_link'
# ./spec/requests/dossiers_spec.rb:62:in `block (3 levels) in <top (required)>'
7) Manage people when viewing a person given a normal person should show correct agreement download/upload links for parent
Failure/Error: find_link('Download Parent Form').should_not be_nil
Capybara::ElementNotFound:
Unable to find xpath .//a[./@href][(((./@id = 'Download Parent Form' or normalize-space(string(.)) = 'Download Parent Form') or ./@title = 'Download Parent Form') or .//img[./@alt = 'Download Parent Form'])] | .//a[./@href][(((./@id = 'Download Parent Form' or contains(normalize-space(string(.)), 'Download Parent Form')) or contains(./@title, 'Download Parent Form')) or .//img[contains(./@alt, 'Download Parent Form')])]
# (eval):2:in `find_link'
# ./spec/requests/people_spec.rb:118:in `block (5 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:117:in `block (4 levels) in <top (required)>'
8) Manage people when viewing a person given a normal person should show correct agreement download/upload links for childminder
Failure/Error: find_link('Download Childminder Form').should_not be_nil
Capybara::ElementNotFound:
Unable to find xpath .//a[./@href][(((./@id = 'Download Childminder Form' or normalize-space(string(.)) = 'Download Childminder Form') or ./@title = 'Download Childminder Form') or .//img[./@alt = 'Download Childminder Form'])] | .//a[./@href][(((./@id = 'Download Childminder Form' or contains(normalize-space(string(.)), 'Download Childminder Form')) or contains(./@title, 'Download Childminder Form')) or .//img[contains(./@alt, 'Download Childminder Form')])]
# (eval):2:in `find_link'
# ./spec/requests/people_spec.rb:129:in `block (5 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:128:in `block (4 levels) in <top (required)>'
9) Manage people when viewing a person given a normal person should show correct agreement download/upload links for both roles
Failure/Error: find_link('Download Childminder Form').should_not be_nil
Capybara::ElementNotFound:
Unable to find xpath .//a[./@href][(((./@id = 'Download Childminder Form' or normalize-space(string(.)) = 'Download Childminder Form') or ./@title = 'Download Childminder Form') or .//img[./@alt = 'Download Childminder Form'])] | .//a[./@href][(((./@id = 'Download Childminder Form' or contains(normalize-space(string(.)), 'Download Childminder Form')) or contains(./@title, 'Download Childminder Form')) or .//img[contains(./@alt, 'Download Childminder Form')])]
# (eval):2:in `find_link'
# ./spec/requests/people_spec.rb:140:in `block (5 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:139:in `block (4 levels) in <top (required)>'
10) Manage people when viewing a person given a normal person should download agreement form for parent
Failure/Error: within('#agreements') { click_link('Download Parent Form') }
Capybara::ElementNotFound:
no link with title, id or text 'Download Parent Form' found
# (eval):2:in `click_link'
# ./spec/requests/people_spec.rb:149:in `block (5 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:149:in `block (4 levels) in <top (required)>'
11) Manage people when viewing a person given a normal person should upload an agreement
Failure/Error: within('#agreements'){ click_link('Upload Signed Parent Contract') }
Capybara::ElementNotFound:
no link with title, id or text 'Upload Signed Parent Contract' found
# (eval):2:in `click_link'
# ./spec/requests/people_spec.rb:155:in `block (5 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:155:in `block (4 levels) in <top (required)>'
12) Manage people when viewing a person given a normal person manage the uploaded agreement should delete the agreement
Failure/Error: within('#agreements') { click_on "Destroy" }
Capybara::ElementNotFound:
no link or button 'Destroy' found
# (eval):2:in `click_on'
# ./spec/requests/people_spec.rb:176:in `block (7 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:176:in `block (6 levels) in <top (required)>'
# ./spec/requests/people_spec.rb:175:in `block (5 levels) in <top (required)>'
13) Manage people create should create a new person with a new partner
Failure/Error: lambda {
count should have been changed by 2, but was changed by 0
# ./spec/requests/people_spec.rb:343:in `block (3 levels) in <top (required)>'
14) Manage people create should create a one way partner relation between person and partner
Failure/Error: @person.partner.id.should == @partner.id
NoMethodError:
undefined method `partner' for nil:NilClass
# ./spec/requests/people_spec.rb:408:in `block (3 levels) in <top (required)>'
15) Manage people update creates a new partner
Failure/Error: @partner.first_name.should == @person3.first_name
NoMethodError:
undefined method `first_name' for nil:NilClass
# ./spec/requests/people_spec.rb:571:in `block (3 levels) in <top (required)>'
16) Manage people update updates partner correctly
Failure/Error: @person_with_partner.first_name.should == @person2.first_name
expected: "Diana"
got: "Roger" (using ==)
# ./spec/requests/people_spec.rb:593:in `block (3 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment