Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSpec has failing specs and is exiting with 0 #277

Closed
ethnt opened this issue Nov 11, 2012 · 1 comment
Closed

RSpec has failing specs and is exiting with 0 #277

ethnt opened this issue Nov 11, 2012 · 1 comment

Comments

@ethnt
Copy link
Contributor

ethnt commented Nov 11, 2012

RSpec should not be exiting with code 0 if it has failing specs.

tardis:clock[master]$ be rspec spec
............................................F..

Failures:

  1) Marquee can be instantiated
     Failure/Error: marquee.should be_nil
       expected: nil
            got: #<Marquee _id: BSON::ObjectId('50a145949972772ba9000081'), text: "Foo to the bar.">
     # ./spec/unit/models/marquee_spec.rb:7:in `block (2 levels) in <top (required)>'

Finished in 5.39 seconds
47 examples, 1 failure

Failed examples:

rspec ./spec/unit/models/marquee_spec.rb:6 # Marquee can be instantiated

tardis:clock[master]$ echo $?
1

Without a DRb server running:

tardis:clock[master]$ be rspec spec
No DRb server is running. Running in local process instead ...
............................................F..

Failures:

  1) Marquee can be instantiated
     Failure/Error: marquee.should be_nil
       expected: nil
            got: #<Marquee _id: BSON::ObjectId('50a146159972772c4c000081'), text: "Foo to the bar.">
     # ./spec/unit/models/marquee_spec.rb:7:in `block (2 levels) in <top (required)>'

Finished in 5.15 seconds
47 examples, 1 failure

Failed examples:

rspec ./spec/unit/models/marquee_spec.rb:6 # Marquee can be instantiated
tardis:clock[master]$ echo $?
0

This is especially an issue in Travis, where it reports that a build has passed when it really hasn't (https://travis-ci.org/eturk/clock/jobs/3146542).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant