forked from mattheworiordan/capybara-screenshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mattheworiordan#163 from jthornec/master
Add support for RSpec's JSON formatter
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'capybara-screenshot/rspec/base_reporter' | ||
|
||
module Capybara | ||
module Screenshot | ||
module RSpec | ||
module JsonReporter | ||
extend BaseReporter | ||
|
||
enhance_with_screenshot :format_example | ||
|
||
def format_example_with_screenshot(example) | ||
format_example_without_screenshot(example).merge({ | ||
screenshot: example.metadata[:screenshot] | ||
}) | ||
end | ||
end | ||
end | ||
end | ||
end |
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