minitest-screenshot-reporter 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6b0c2ca9d2ede0a204ebec28c4ef15129da10aa
4
- data.tar.gz: c13b99e3913eeee9f33c6b60398933fbeedf60c4
3
+ metadata.gz: 3ccaa2b9a5a497d9a854d90bfa69c3161f565a38
4
+ data.tar.gz: 52c035e85b775e1470eb426c2cd7d4ae0bbf4be5
5
5
  SHA512:
6
- metadata.gz: 2bfe079c84487fac90af67c032aab4460ba741f4ce746e3d40de0a6350f8f2042096281fb62b928f674511a3c7ee66cde57a43b8092519ffd1aca9fe007e8644
7
- data.tar.gz: 3b30292f751785e7793ced821bda812332c5baf3d4ac7d88e019cef0408286c2ceaca6c590831d6c56be336a299d65be1cce8ccc01f97949c189d81e29b90661
6
+ metadata.gz: 3a7187ec7a2cf8259a5c1da4a884dfa61df1dbc809606229fe097c889621d6749b02de0f36c8c106b47d9ab3e54de96257af72c22e57fd3163bde481a82277ae
7
+ data.tar.gz: e5da17e1eb4f510c128a74e3c95e69c25a07cff0918ba5404bdcd2e0c859235febc59c8d21c29d4eaceafceeddc0f323db4c3ef0b86b35a92cedffb978d94c8d
data/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [coveralls]: https://coveralls.io/r/igorj/minitest-screenshot-reporter
14
14
 
15
15
 
16
- Minitest reporter that automatically creates a screenshot on error or failure.
16
+ Minitest reporter that automatically creates a screenshot on error or failure.
17
17
 
18
18
  ## Installation
19
19
 
@@ -46,6 +46,8 @@ Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new,
46
46
 
47
47
  Run your tests, and if there are errors or failures in your integration tests, check the directory *test/screenshots*.
48
48
 
49
+ You can also include the `Minitest::Reporters::Screenshot` module to your integration test class. Than you can use the method `screenshot(name)` to explicitly create additional screenshots in *test/screenshots* in your integration tests.
50
+
49
51
  ## Development
50
52
 
51
53
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,4 +1,5 @@
1
1
  require 'minitest-screenshot-reporter/version'
2
+ require 'minitest/reporters/screenshot'
2
3
 
3
4
  module MinitestScreenshotReporter
4
5
  end
@@ -1,3 +1,3 @@
1
1
  module MinitestScreenshotReporter
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -0,0 +1,11 @@
1
+ module Minitest
2
+ module Reporters
3
+ module Screenshot
4
+ # Use this method to explicitly create screenshots during your tests
5
+ # @param file_name Screenshot file name without extension (png extension automatically added)
6
+ def screenshot(file_name)
7
+ save_screenshot File.join('test/screenshots', "#{file_name}.png")
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,4 +1,5 @@
1
1
  require 'capybara/dsl'
2
+ require 'minitest/reporters/screenshot'
2
3
 
3
4
  # Use with capybara integration tests
4
5
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-screenshot-reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev
@@ -169,6 +169,7 @@ files:
169
169
  - bin/setup
170
170
  - lib/minitest-screenshot-reporter.rb
171
171
  - lib/minitest-screenshot-reporter/version.rb
172
+ - lib/minitest/reporters/screenshot.rb
172
173
  - lib/minitest/reporters/screenshot_reporter.rb
173
174
  - minitest-screenshot-reporter.gemspec
174
175
  homepage: https://github.com/igorj/minitest-screenshot-reporter