capybara-screenshot 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,13 @@
1
+ 15 Jan 2012
2
+ -----------
3
+
4
+ Removed unnecessary and annoying warning that a screen shot cannot be taken. This message was being shown when RSpec tests were run that did not even invoke Capybara
5
+
6
+ 13 Jan 2012
7
+ -----------
8
+
9
+ Updated documentation to reflect support for more frameworks, https://github.com/mattheworiordan/capybara-screenshot/issues/9
10
+
1
11
  3 Jan 2012
2
12
  ----------
3
13
 
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) [cucumber](http://cukes.info/) scenario fails, the HTML for the failed page and a screenshot (when using [capybara-webkit](https://github.com/thoughtbot/capybara-webkit)) 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 /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
 
@@ -22,8 +22,8 @@ Example application
22
22
  -------------------
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
- Git clone the app, and then run Cucumber `rake cucumber` or RSpec `rspec spec/**/*_spec.rb` and expect failures.
26
- Then check the tmp/capybara folder for the automatic screen shots generated from failed tests.
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.
27
27
 
28
28
  Repository
29
29
  ----------
@@ -44,4 +44,4 @@ This gem was written by **Matthew O'Riordan**
44
44
  License
45
45
  -------
46
46
 
47
- Copyright © 2011 Matthew O'Riordan, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.
47
+ Copyright © 2012 Matthew O'Riordan, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.
@@ -6,9 +6,8 @@ module Capybara
6
6
  html_path = nil
7
7
  image_path = nil
8
8
 
9
- if capybara.current_path.to_s.empty?
10
- puts "Current path is empty, can't take a screenshot"
11
- else
9
+ # if current_path empty then nothing to screen shot as browser has not loaded any URL
10
+ unless capybara.current_path.to_s.empty?
12
11
  require 'capybara/util/save_and_open_page'
13
12
  file_base_name = "#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}"
14
13
  #will save to the capybara.save_and_open_page_path
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Screenshot
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
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: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
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-03 00:00:00 +00:00
18
+ date: 2012-01-15 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency