Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make sure @suite is not nil

We had an issue with our RSpec config.before(:suite) block.  Was
getting:

NoMethodError: undefined method `finish' for nil:NilClass
  write_report at …/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:202
  • Loading branch information...
commit adaa0499f527af674779ffa46b7beb7ebdc2876a 1 parent 31f0dd7
Patrick Cheng authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/ci/reporter/rspec.rb
View
6 lib/ci/reporter/rspec.rb
@@ -203,8 +203,10 @@ def description_for(name_or_example)
end
def write_report
- @suite.finish
- @report_manager.write_report(@suite)
+ if @suite
+ @suite.finish
+ @report_manager.write_report(@suite)
+ end
end
def new_suite(name)
Please sign in to comment.
Something went wrong with that request. Please try again.