Skip to content

Commit

Permalink
make sure @suite is not nil
Browse files Browse the repository at this point in the history
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
Patrick Cheng committed Jul 17, 2012
1 parent 31f0dd7 commit adaa049
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ci/reporter/rspec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ def description_for(name_or_example)
end end


def write_report def write_report
@suite.finish if @suite
@report_manager.write_report(@suite) @suite.finish
@report_manager.write_report(@suite)
end
end end


def new_suite(name) def new_suite(name)
Expand Down

0 comments on commit adaa049

Please sign in to comment.