chinchilla 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -39,6 +39,8 @@ module Chinchilla
|
|
39
39
|
@results ||= begin
|
40
40
|
session.visit(url)
|
41
41
|
|
42
|
+
session.execute_script(runner_js)
|
43
|
+
|
42
44
|
dots_printed = 0
|
43
45
|
|
44
46
|
begin
|
@@ -57,6 +59,10 @@ module Chinchilla
|
|
57
59
|
end
|
58
60
|
end
|
59
61
|
|
62
|
+
def runner_js
|
63
|
+
"(function() {"+File.read(File.expand_path("../runner.js", __FILE__))+"})();"
|
64
|
+
end
|
65
|
+
|
60
66
|
def failed_examples
|
61
67
|
examples.select { |example| not example.passed? }
|
62
68
|
end
|
data/lib/chinchilla/runner.rb
CHANGED
@@ -24,6 +24,10 @@ module Chinchilla
|
|
24
24
|
@driver ||= @options[:driver] || :poltergeist
|
25
25
|
end
|
26
26
|
|
27
|
+
def poltergeist?
|
28
|
+
driver == :poltergeist
|
29
|
+
end
|
30
|
+
|
27
31
|
def application
|
28
32
|
@application ||= @options[:application] || default_application
|
29
33
|
end
|
@@ -76,7 +80,12 @@ module Chinchilla
|
|
76
80
|
end
|
77
81
|
|
78
82
|
def session
|
79
|
-
@session ||=
|
83
|
+
@session ||= begin
|
84
|
+
if poltergeist? && !defined?(Capybara::Poltergeist)
|
85
|
+
require "capybara/poltergeist"
|
86
|
+
end
|
87
|
+
Capybara::Session.new(driver, application)
|
88
|
+
end
|
80
89
|
end
|
81
90
|
end
|
82
91
|
end
|
data/lib/chinchilla/version.rb
CHANGED
data/lib/chinchilla.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chinchilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
@@ -72,10 +72,10 @@ files:
|
|
72
72
|
- README.md
|
73
73
|
- Rakefile
|
74
74
|
- chinchilla.gemspec
|
75
|
-
- lib/assets/javascripts/qunit-runner.js
|
76
75
|
- lib/chinchilla.rb
|
77
76
|
- lib/chinchilla/runner.rb
|
78
77
|
- lib/chinchilla/runner/example.rb
|
78
|
+
- lib/chinchilla/runner/runner.js
|
79
79
|
- lib/chinchilla/runner/test.rb
|
80
80
|
- lib/chinchilla/version.rb
|
81
81
|
homepage: ''
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
segments:
|
94
94
|
- 0
|
95
|
-
hash:
|
95
|
+
hash: 2808188431047913734
|
96
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
segments:
|
103
103
|
- 0
|
104
|
-
hash:
|
104
|
+
hash: 2808188431047913734
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
107
|
rubygems_version: 1.8.23
|