utensils 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/utensils/capybara_screenshot.rb +11 -0
- data/lib/utensils/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fc75982f3a8ce39671a37c1a735288c5ada4cb7
|
4
|
+
data.tar.gz: 6daecd5d3585b3e5e3ec85b30e38d9f1ba810a69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ee0550ddf1ea3236f7355eb3c1ad34b7f02b79a86e10b10e2be2ae61abba9736adf9254ec521f59c26c7d983471be9000cdd2f27e3f70f099b1929d616cb657
|
7
|
+
data.tar.gz: 92c5a54ababa3217b428c17051a4eef9e0e3ad790264d34d3e9a09c8a7b6117c93092d7910eadca08af662d19112cd9d4673822d7661250496ee40f3eca7aee4
|
data/README.md
CHANGED
@@ -16,6 +16,7 @@ Add this line to your application's Gemfile:
|
|
16
16
|
```ruby
|
17
17
|
require 'utensils/capybara_extensions'
|
18
18
|
require 'utensils/capybara_javascript'
|
19
|
+
require 'utensils/capybara_screenshot'
|
19
20
|
require 'utensils/custom_matchers'
|
20
21
|
require 'utensils/database_cleaner'
|
21
22
|
require 'utensils/factory_girl'
|
@@ -40,6 +41,11 @@ page.find(book_2).drag_to(page.find(book_1))
|
|
40
41
|
Switches javascript driver to capybara-webkit and ignores hidden
|
41
42
|
elements.
|
42
43
|
|
44
|
+
### capybara_screenshot
|
45
|
+
|
46
|
+
Automatically saves an html file viewable at
|
47
|
+
localhost:3000/tmp/screenshot.html on failing specs
|
48
|
+
|
43
49
|
### custom_matchers
|
44
50
|
|
45
51
|
A set of convenient matchers for rspec
|
@@ -101,7 +107,7 @@ Disables all outgoing http requests except for examples marked with :allow_http,
|
|
101
107
|
|
102
108
|
```ruby
|
103
109
|
describe 'examples' do
|
104
|
-
it 'uses http cached with VCR', :
|
110
|
+
it 'uses http cached with VCR', :vcr do
|
105
111
|
...
|
106
112
|
end
|
107
113
|
it 'disables all outgoing http' do
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'capybara-screenshot/rspec'
|
2
|
+
Capybara.save_and_open_page_path = 'public/tmp'
|
3
|
+
Capybara::Screenshot.append_screenshot_path = false
|
4
|
+
|
5
|
+
#TODO: Pull request allowing you to disable timestamps
|
6
|
+
class Capybara::Screenshot::Saver
|
7
|
+
def initialize(capybara, page, html_save=true, filename_prefix='screenshot')
|
8
|
+
@capybara, @page, @html_save = capybara, page, html_save
|
9
|
+
@file_base_name = filename_prefix
|
10
|
+
end
|
11
|
+
end
|
data/lib/utensils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utensils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rspec stuff we use over and over again
|
14
14
|
email:
|
@@ -25,6 +25,7 @@ files:
|
|
25
25
|
- lib/utensils.rb
|
26
26
|
- lib/utensils/capybara_extensions.rb
|
27
27
|
- lib/utensils/capybara_javascript.rb
|
28
|
+
- lib/utensils/capybara_screenshot.rb
|
28
29
|
- lib/utensils/custom_matchers.rb
|
29
30
|
- lib/utensils/database_cleaner.rb
|
30
31
|
- lib/utensils/factory_girl.rb
|
@@ -54,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
55
|
version: '0'
|
55
56
|
requirements: []
|
56
57
|
rubyforge_project:
|
57
|
-
rubygems_version: 2.0.
|
58
|
+
rubygems_version: 2.0.3
|
58
59
|
signing_key:
|
59
60
|
specification_version: 4
|
60
61
|
summary: Rspec stuff we use over and over again
|