capybara-screenshot 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/capybara-screenshot.rb +11 -8
- data/lib/capybara-screenshot/version.rb +1 -1
- metadata +4 -4
data/lib/capybara-screenshot.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# do nothing if Cucumber is not being used
|
2
|
+
if defined?(Cucumber::RbSupport::RbDsl)
|
3
|
+
require 'capybara/cucumber'
|
4
|
+
require 'capybara-screenshot/world'
|
3
5
|
|
4
|
-
module Capybara
|
5
|
-
|
6
|
+
module Capybara
|
7
|
+
module Screenshot
|
8
|
+
end
|
6
9
|
end
|
7
|
-
end
|
8
10
|
|
9
|
-
World(Capybara::Screenshot::World)
|
11
|
+
World(Capybara::Screenshot::World)
|
10
12
|
|
11
|
-
After do |scenario|
|
12
|
-
|
13
|
+
After do |scenario|
|
14
|
+
screen_shot_and_save_page if scenario.failed?
|
15
|
+
end
|
13
16
|
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:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
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: 2011-
|
18
|
+
date: 2011-11-15 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|