-
Notifications
You must be signed in to change notification settings - Fork 174
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
Mark Bugsnag frames as out of project #497
Merged
Merged
Changes from 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1360276
Bugsnag frames InProject: Remove nilification of Bugsnag lib frames
Cawllec 60a8729
Bugsnag frames InProject: Update report spec frames
Cawllec 179f3be
Bugsnag frames InProject: Ensure correct frame is passed back
Cawllec a99e452
Bugsnag frame InProject: Allow non-top frame to be selected
Cawllec 02bf1c9
Bugsnag frames InProject: Add Bugsnag frames tests
Cawllec eb8ae62
Bugsnag frames InProject: Cleared up comments and tests
Cawllec 59af113
Merge branch 'master' into cawllec/in-project-bugsnag
Cawllec 9e14ecf
Bugsnag frames inproject: Updated maze tests
Cawllec 90594cf
Bugsnag frame inproject: Updates rails tests
Cawllec 07ea1bf
Bugsnag frames inproject: Updates to stackframe maze tests
Cawllec 25b5b94
Bugsnag frames in-project: Updated tests to better reflect new stackf…
Cawllec 0449c44
Bugsnag frames in-project: Accounted for JRUBY stackframes differing …
Cawllec 4c5ea1a
Bugsnag frames in-project: Separated notified strings tests out
Cawllec 3256f77
Bugsnag frames in-project: Make scenario names more explicit
Cawllec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,29 @@ | |
|
||
describe Bugsnag::Stacktrace do | ||
it "includes code in the stack trace" do | ||
_a = 1 | ||
_b = 2 | ||
_c = 3 | ||
notify_test_exception | ||
_d = 4 | ||
_e = 5 | ||
_f = 6 | ||
begin | ||
_a = 1 | ||
_b = 2 | ||
_c = 3 | ||
"Test".prepnd "T" | ||
_d = 4 | ||
_e = 5 | ||
_f = 6 | ||
rescue Exception => e | ||
Bugsnag.notify(e) | ||
end | ||
|
||
expect(Bugsnag).to have_sent_notification{ |payload, headers| | ||
exception = get_exception_from_payload(payload) | ||
starting_line = __LINE__ - 10 | ||
expect(exception["stacktrace"][1]["code"]).to eq({ | ||
(starting_line + 0).to_s => " _a = 1", | ||
(starting_line + 1).to_s => " _b = 2", | ||
(starting_line + 2).to_s => " _c = 3", | ||
(starting_line + 3).to_s => " notify_test_exception", | ||
(starting_line + 4).to_s => " _d = 4", | ||
(starting_line + 5).to_s => " _e = 5", | ||
(starting_line + 6).to_s => " _f = 6" | ||
starting_line = __LINE__ - 13 | ||
expect(exception["stacktrace"][0]["code"]).to eq({ | ||
(starting_line + 0).to_s => " _a = 1", | ||
(starting_line + 1).to_s => " _b = 2", | ||
(starting_line + 2).to_s => " _c = 3", | ||
(starting_line + 3).to_s => " \"Test\".prepnd \"T\"", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be easier to read if you used single quotes on the outside so you don't have to escape the double quotes inside. |
||
(starting_line + 4).to_s => " _d = 4", | ||
(starting_line + 5).to_s => " _e = 5", | ||
(starting_line + 6).to_s => " _f = 6" | ||
}) | ||
} | ||
end | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a specific number rather than > 0