capybara-screenshot 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/lib/capybara-screenshot/saver.rb +2 -0
- data/lib/capybara-screenshot/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
capybara-screenshot gem
|
2
2
|
=======================
|
3
3
|
|
4
|
-
Using this gem, whenever a [Capybara](https://github.com/jnicklas/capybara) test in [Cucumber](http://cukes.info/), [Rspec](https://www.relishapp.com/rspec) or Minitest fails, the HTML for the failed page and a screenshot (when using [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) or [Selenium](http://seleniumhq.org/)) is saved into /tmp/capybara.
|
4
|
+
Using this gem, whenever a [Capybara](https://github.com/jnicklas/capybara) test in [Cucumber](http://cukes.info/), [Rspec](https://www.relishapp.com/rspec) or Minitest fails, the HTML for the failed page and a screenshot (when using [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) or [Selenium](http://seleniumhq.org/)) is saved into $APPLICATION_ROOT/tmp/capybara.
|
5
5
|
|
6
6
|
This is a huge help when trying to diagnose a problem in your failing steps as you can view the source code and potentially how the page looked at the time of the failure.
|
7
7
|
|
@@ -23,7 +23,7 @@ Example application
|
|
23
23
|
|
24
24
|
A simple Rails 3.1 example application has been set up at [https://github.com/mattheworiordan/capybara-screenshot-test-rails-3.1](https://github.com/mattheworiordan/capybara-screenshot-test-rails-3.1)
|
25
25
|
Git clone the app, and then run Cucumber `rake cucumber`, RSpec `rspec spec/**/*_spec.rb` and Minitest `rake test` and expect intentional failures.
|
26
|
-
Now check the tmp/capybara folder for the automatic screen shots generated from failed tests.
|
26
|
+
Now check the $APPLICATION_ROOT/tmp/capybara folder for the automatic screen shots generated from failed tests.
|
27
27
|
|
28
28
|
Repository
|
29
29
|
----------
|
@@ -17,6 +17,8 @@ module Capybara
|
|
17
17
|
#where should we save the screenshot to
|
18
18
|
if defined?(Rails)
|
19
19
|
screenshot_path = Rails.root.join "#{capybara.save_and_open_page_path}/#{file_base_name}.png"
|
20
|
+
elsif defined?(Padrino)
|
21
|
+
screenshot_path = Padrino.root "#{capybara.save_and_open_page_path}/#{file_base_name}.png"
|
20
22
|
elsif defined?(Sinatra)
|
21
23
|
# Sinatra support, untested
|
22
24
|
screenshot_path = File.join(settings.root, "#{capybara.save_and_open_page_path}/#{file_base_name}.png")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 10
|
10
|
+
version: 0.1.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew O'Riordan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-01-
|
18
|
+
date: 2012-01-30 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|