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

Fix raven:test NoMethodError: undefined method id for Hash error #318

Merged
merged 2 commits into from
Apr 14, 2015

Conversation

weynsee
Copy link
Contributor

@weynsee weynsee commented Apr 14, 2015

When running rake raven:test, the task exits with NoMethodError: undefined method id for #Hash:... error. This is because Raven.capture_exception(e) returns a hash representation of Raven:Event, so event.id leads to an error. This PR checks whether the returned event is a Hash, and if so, retrieves the id from it.

@nateberkopec
Copy link
Contributor

Ack! Need to improve our test coverage here too if that passed anyway.

@weynsee
Copy link
Contributor Author

weynsee commented Apr 14, 2015

I've added specs for CLI (which is largely copied from integration_spec.rb) that would have caught that error. Hope this helps!

@nateberkopec
Copy link
Contributor

Awesome! Should get a release for this out.

nateberkopec added a commit that referenced this pull request Apr 14, 2015
Fix raven:test NoMethodError: undefined method `id` for Hash error
@nateberkopec nateberkopec merged commit b7bb318 into getsentry:master Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants