File tree Expand file tree Collapse file tree 5 files changed +20
-26
lines changed Expand file tree Collapse file tree 5 files changed +20
-26
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ gem 'uglifier', '>= 1.3.0'
14
14
group :development , :test do
15
15
gem 'byebug' # Call 'byebug' in code to stop execution and get a debugger console
16
16
gem 'capybara'
17
- gem 'chromedriver-helper' # used by JavaScript-dependent feature specs (`js: true`)
17
+ # gem 'chromedriver-helper' # helps with using Chrome in feature specs
18
18
gem 'factory_girl_rails' , '~> 4.5'
19
19
gem 'pry'
20
20
gem 'pry-rails'
31
31
group :test do
32
32
gem 'database_cleaner'
33
33
gem 'email_spec'
34
+ gem 'poltergeist' # helps with using PhantomJS headless browser in feature specs
34
35
gem 'shoulda-matchers' , require : false
35
36
gem 'vcr'
36
37
gem 'webmock'
Original file line number Diff line number Diff line change 36
36
minitest (~> 5.1 )
37
37
thread_safe (~> 0.3 , >= 0.3.4 )
38
38
tzinfo (~> 1.1 )
39
- addressable (2.3.6 )
39
+ addressable (2.3.8 )
40
40
arel (6.0.0 )
41
41
bcrypt (3.1.9 )
42
42
binding_of_caller (0.7.2 )
54
54
xpath (~> 2.0 )
55
55
childprocess (0.5.5 )
56
56
ffi (~> 1.0 , >= 1.0.11 )
57
- chromedriver-helper (0.0.8 )
58
- nokogiri (~> 1.6 )
59
- version_sorter (~> 1.1 )
57
+ cliver (0.3.2 )
60
58
coderay (1.1.0 )
61
59
coffee-rails (4.1.0 )
62
60
coffee-script (>= 2.2.0 )
128
126
nokogiri (1.6.6.2 )
129
127
mini_portile (~> 0.6.0 )
130
128
orm_adapter (0.5.0 )
129
+ poltergeist (1.6.0 )
130
+ capybara (~> 2.1 )
131
+ cliver (~> 0.3.1 )
132
+ multi_json (~> 1.0 )
133
+ websocket-driver (>= 0.2.0 )
131
134
pry (0.10.1 )
132
135
coderay (~> 1.1.0 )
133
136
method_source (~> 0.8.1 )
140
143
pry-stack_explorer (0.4.9.1 )
141
144
binding_of_caller (>= 0.7 )
142
145
pry (>= 0.9.11 )
143
- puffing-billy (0.5.0 )
146
+ puffing-billy (0.5.1 )
144
147
addressable
145
148
em-http-request (~> 1.1.0 )
146
149
em-synchrony
235
238
execjs (>= 0.3.0 )
236
239
json (>= 1.8.0 )
237
240
vcr (2.9.3 )
238
- version_sorter (1.1.1 )
239
241
warden (1.2.3 )
240
242
rack (>= 1.0 )
241
243
web-console (2.0.0 )
247
249
addressable (>= 2.3.6 )
248
250
crack (>= 0.3.2 )
249
251
websocket (1.2.1 )
252
+ websocket-driver (0.5.4 )
253
+ websocket-extensions (>= 0.1.0 )
254
+ websocket-extensions (0.1.2 )
250
255
xpath (2.0.0 )
251
256
nokogiri (~> 1.3 )
252
257
@@ -256,14 +261,14 @@ PLATFORMS
256
261
DEPENDENCIES
257
262
byebug
258
263
capybara
259
- chromedriver-helper
260
264
coffee-rails (~> 4.1.0 )
261
265
database_cleaner
262
266
devise
263
267
email_spec
264
268
factory_girl_rails (~> 4.5 )
265
269
jquery-rails
266
270
nokogiri
271
+ poltergeist
267
272
pry
268
273
pry-rails
269
274
pry-rescue
Original file line number Diff line number Diff line change 2
2
3
3
# 0. Check spec/support dir is auto-required in spec/rails_helper.rb.
4
4
#
5
- # 1. Add capybara, selenium-webdriver, and chromedriver-helper to Gemfile:
5
+ # 1. Add these to your Gemfile:
6
6
#
7
7
# group :development, :test do
8
8
# gem 'capybara'
9
- # # selenium-webdriver & chromedriver-helper used by
10
- # # JavaScript-dependent feature specs (`js: true`):
11
- # gem 'selenium-webdriver'
12
- # gem 'chromedriver-helper'
9
+ # gem 'selenium-webdriver' # For Firefox
10
+ # # gem 'chromedriver-helper' # Install to use Chrome in feature specs
13
11
# end
14
12
#
15
13
# 2. Create a file like this one you're reading in spec/support/capybara.rb:
Original file line number Diff line number Diff line change 4
4
# with descriptive names related to the underlying browser's HTML5 support.
5
5
module CapybaraDriverResolver
6
6
7
- # At time of writing: These drivers wrap chrome or phantomjs and they both support
7
+ # At time of writing: These drivers wrap phantomjs or chrome and they both support
8
8
# native date inputs.
9
- WITH_NATIVE_DATE_INPUT = [ :selenium_chrome_billy , :poltergeist_billy , :poltergeist ]
9
+ WITH_NATIVE_DATE_INPUT = [ :poltergeist_billy , :poltergeist , :selenium_chrome_billy ]
10
10
11
11
# At time of writing: These drivers wrap Firefox browsers that don't support native
12
12
# date inputs.
13
13
WITHOUT_NATIVE_DATE_INPUT = [ :selenium_billy , :selenium ]
14
14
15
-
16
15
def driver_with ( options )
17
16
18
17
potential_drivers = options [ :native_date_input ] ? WITH_NATIVE_DATE_INPUT : WITHOUT_NATIVE_DATE_INPUT
Original file line number Diff line number Diff line change 37
37
38
38
# 5. Uncomment the *_billy driver for your desired browser:
39
39
Capybara . javascript_driver = :selenium_billy # Uses Firefox
40
+ # Capybara.javascript_driver = :selenium_chrome_billy
40
41
# Capybara.javascript_driver = :webkit_billy
41
42
# Capybara.javascript_driver = :poltergeist_billy
42
- Capybara . register_driver :selenium_chrome_billy do |app |
43
- Capybara ::Selenium ::Driver . new (
44
- app , browser : :chrome ,
45
- switches : [
46
- "--proxy-server=#{ Billy . proxy . host } :#{ Billy . proxy . port } "
47
- # "--ignore-certificate-errors" # May be needed in future
48
- ]
49
- )
50
- end
51
- # Capybara.javascript_driver = :selenium_chrome_billy
52
43
53
44
# 6. Start using Puffing Billy. See spec/features/share_page_spec.rb for an example,
54
45
# and find your cached responses in spec/support/http_cache/billy
You can’t perform that action at this time.
0 commit comments