Skip to content

Instantly share code, notes, and snippets.

@brunoocasali
Created April 10, 2015 17:37
Show Gist options
  • Save brunoocasali/a28be694c76339347d0a to your computer and use it in GitHub Desktop.
Save brunoocasali/a28be694c76339347d0a to your computer and use it in GitHub Desktop.
Erros e mais erros :/ AHAHHAHAHA
# SEM USAR O require... no próprio arquivo
[bruno@chp repense-asi]$ rspec spec/jobs/the_job_spec.rb
F
Failures:
1) TheJob sets condition
Failure/Error: expect(subject.condition).to equal(subject.artifacts.number)
NoMethodError:
undefined method `condition' for #<TheJob:0x000000065c83d8>
# ./spec/jobs/the_job_spec.rb:9:in `block (2 levels) in <top (required)>'
Finished in 0.63727 seconds (files took 4.81 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/jobs/the_job_spec.rb:4 # TheJob sets condition
Coverage report generated for RSpec to /home/bruno/develop/is/repense-asi/tmp/code_analysis/coverage. 66 / 88 LOC (75.0%) covered.
[bruno@chp repense-asi]$
# USANDO o require no próprio arquivo
[bruno@chp repense-asi]$ rspec spec/jobs/the_job_spec.rb
F
Failures:
1) TheJob sets condition
Failure/Error: expect(subject.condition).to equal(subject.artifacts.number)
expected #<Fixnum:3> => 1
got #<NilClass:8> => nil
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
# ./spec/jobs/the_job_spec.rb:10:in `block (2 levels) in <top (required)>'
Finished in 0.66307 seconds (files took 4.79 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/jobs/the_job_spec.rb:5 # TheJob sets condition
Coverage report generated for RSpec to /home/bruno/develop/is/repense-asi/tmp/code_analysis/coverage. 66 / 88 LOC (75.0%) covered.
[bruno@chp repense-asi]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment