jasmine / jasmine-gem

Jasmine ruby gem
682 stars 274 forks source link

Result.rb line 34 blows up if attrs['failedExpectations'] is nil #231

Closed nas887 closed 9 years ago

nas887 commented 9 years ago

fix an issue where map failures blows up if attrs[failedExpectations] is...

slackersoft commented 9 years ago

How are you getting into a situation where the failedExpectations is nil. Jasmine should always set it to at least an empty array and that's what should be getting passed through by a runner for jasmine gem. I've confirmed that both the phantom runner here and the selenium runner should both be just passing through the array from jasmine-core.

In addition you haven't included any specs with this pull request, since jasmine is a testing framework, we need to have coverage of changes so we don't accidentally lose them in the future. See the contributors guide

covaithe commented 9 years ago

I'm getting this error too. It comes from a jasmine_suite_result line in the output, which does not have a failedExpectations element at all. Its json looks like this:

{"description"=>"Filter: isEmpty", "fullName"=>"Filter: isEmpty", "id"=>"suite5", "status"=>""}

edit: turns out I had jasmine-core-2.0.2 in my Gemfile.lock, and the failedExpectations element was added to suite results more recently. 'bundle update jasmine' fixed this for me.

slackersoft commented 9 years ago

Closing this as we haven't heard anything on this issue in a while.