Skip to content

Instantly share code, notes, and snippets.

@jesjos
Created March 20, 2012 20:23
Show Gist options
  • Save jesjos/2140916 to your computer and use it in GitHub Desktop.
Save jesjos/2140916 to your computer and use it in GitHub Desktop.
Failures:
1) Lab relations should have a list of submissions
Failure/Error: build(:lab, submissions: [create(:submission)]).should have(1).submissions
NoMethodError:
undefined method `given_course' for nil:NilClass
# ./app/models/lab_has_group.rb:16:in `given_courses_match'
# ./spec/models/lab_spec.rb:71:in `block (3 levels) in <top (required)>'
2) Lab relations should have a list of lab_has_groups
Failure/Error: create(:lab, lab_has_groups: [create(:lab_has_group)]).should have(1).lab_has_groups
NoMethodError:
undefined method `given_course' for nil:NilClass
# ./app/models/lab_has_group.rb:16:in `given_courses_match'
# ./spec/models/lab_spec.rb:60:in `block (3 levels) in <top (required)>'
3) Lab relations should have a list of lab groups
Failure/Error: lhg = create(:lab_has_group, lab_group: group, lab: lab)
ActiveRecord::RecordInvalid:
Validation failed: Given courses for lab and lab group do not match
# ./spec/models/lab_spec.rb:66:in `block (3 levels) in <top (required)>'
4) Lab add a group should not be able to add a group with an incorrect given course
Failure/Error: lambda { lab.add_group(lab_group_incorrect_course) }.should raise_error
expected Exception but nothing was raised
# ./spec/models/lab_spec.rb:157: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