Skip to content

Instantly share code, notes, and snippets.

@cypherjones
Created June 17, 2014 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cypherjones/f07a3bc497a5001b9f06 to your computer and use it in GitHub Desktop.
Save cypherjones/f07a3bc497a5001b9f06 to your computer and use it in GitHub Desktop.
rspec error: undefined method...
➜ myflix git:(mod0) ✗ rspec
..FFF
Failures:
1) Video
Failure/Error: it { should belongs_to(:category) }
NoMethodError:
undefined method `belongs_to' for #<RSpec::ExampleGroups::Video_2:0x000001068469d8>
# ./spec/models/video_spec.rb:4:in `block (2 levels) in <top (required)>'
2) Video
Failure/Error: it { should validates_presence_of(:title) }
NoMethodError:
undefined method `validates_presence_of' for #<RSpec::ExampleGroups::Video_2:0x00000106857800>
# ./spec/models/video_spec.rb:5:in `block (2 levels) in <top (required)>'
3) Video
Failure/Error: it { should validates_presence_of(:description) }
NoMethodError:
undefined method `validates_presence_of' for #<RSpec::ExampleGroups::Video_2:0x00000106856590>
# ./spec/models/video_spec.rb:6:in `block (2 levels) in <top (required)>'
Finished in 0.03967 seconds (files took 1.99 seconds to load)
5 examples, 3 failures
Failed examples:
rspec ./spec/models/video_spec.rb:4 # Video
rspec ./spec/models/video_spec.rb:5 # Video
rspec ./spec/models/video_spec.rb:6 # Video
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment