test-unit-rails 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3092b59d0d4d94ccfe695229529c9b7c836f83d5e245fc62346bef7a0bc8b6c6
4
- data.tar.gz: 82da852f72408c0c1b186056b2df3ff68bca4a1a8cd00171da7141fccc8b5af4
3
+ metadata.gz: 9d63ed3c2b2cae154e55f62d72c175e08f42ca58e2577366cba2b9a757461e68
4
+ data.tar.gz: 6410d8133ebd8c89195d7d21123cc4fbe787f19f80940e92a0452cf158cd62f4
5
5
  SHA512:
6
- metadata.gz: d588ccca5c624004b06b557ee33652b0938bff87f592eb5dd8d46b3d28ded3a5c72dada531450f12c890253fc7078dfbab156176fccd050530f55c80255761ee
7
- data.tar.gz: c26279c2926b3127ea130ae5cb87128a2110205037887b1ebce05c8ed181ed7f1b1e936c30d2a5fd697c6a9a67b904504f49ee16f1958033a2a4f880c1c16f08
6
+ metadata.gz: 5b477283372f79080ebe2c9b44acb77168b6d7612eeede9b718ef9598f86d06081a2a07fcf88e2eca53ba368eb840d6f7d1298428cee6c23cbc51c66c68e7bdd
7
+ data.tar.gz: 1957ba27a3f016eded52be95fdb176e7892fa842a2b567ed43cac07da6ff78dab92be1321140ebf651febdf202bc9de37fc258489672c140ef62ac52b720a85b
@@ -1,11 +1,22 @@
1
1
  # News
2
2
 
3
+ ## 5.2.2 - 2018-08-20 {#version-5-2-2}
4
+
5
+ ### Improvements
6
+
7
+ * Added support for Rails 5.1 without Puma.
8
+ [GitHub#21][Patch by neko maho]
9
+
10
+ ### Thanks
11
+
12
+ * neko maho
13
+
3
14
  ## 5.2.1 - 2018-08-10 {#version-5-2-1}
4
15
 
5
16
  ### Improvements
6
17
 
7
18
  * Added support for `ActionDispatch::SystemTestCase`.
8
- [GitHub#21][Patch by okkez]
19
+ [GitHub#20][Patch by okkez]
9
20
 
10
21
  ### Thanks
11
22
 
@@ -38,7 +38,6 @@ require "active_support/testing/constant_lookup"
38
38
  require "action_controller"
39
39
  require "action_controller/test_case"
40
40
  require "action_dispatch/testing/integration"
41
- require "action_dispatch/system_test_case"
42
41
 
43
42
  if defined?(ActiveRecord::Migration)
44
43
  if ActiveRecord::Migration.respond_to?(:maintain_test_schema!)
@@ -88,14 +87,19 @@ class ActionDispatch::IntegrationTest
88
87
  include Capybara::DSL
89
88
  end
90
89
 
91
- class ActionDispatch::SystemTestCase
92
- setup before: :prepend do
93
- self.class.driver.use
94
- end
90
+ begin
91
+ require "action_dispatch/system_test_case"
92
+ rescue LoadError
93
+ else
94
+ class ActionDispatch::SystemTestCase
95
+ setup before: :prepend do
96
+ self.class.driver.use
97
+ end
95
98
 
96
- # take screenshot before reset session
97
- teardown after: :prepend do
98
- take_failed_screenshot
99
- Capybara.reset_sessions!
99
+ # take screenshot before reset session
100
+ teardown after: :prepend do
101
+ take_failed_screenshot
102
+ Capybara.reset_sessions!
103
+ end
100
104
  end
101
105
  end
@@ -17,7 +17,7 @@
17
17
  module Test
18
18
  module Unit
19
19
  module Rails
20
- VERSION = "5.2.1"
20
+ VERSION = "5.2.2"
21
21
  end
22
22
  end
23
23
  end
@@ -1,18 +1,25 @@
1
1
  require "test_helper"
2
2
 
3
- if ENV["TRAVIS"]
4
- require "chromedriver/helper"
5
- Chromedriver.set_version "2.35"
6
- end
3
+ if ActionDispatch::SystemTesting.const_defined?(:Server)
4
+ if ENV["TRAVIS"]
5
+ require "chromedriver/helper"
6
+ Chromedriver.set_version "2.35"
7
+ end
7
8
 
8
- class TestSystemTestCase < ActionDispatch::SystemTestCase
9
- driven_by :selenium, using: :headless_chrome, screen_size: [1920, 1080]
9
+ class TestSystemTestCase < ActionDispatch::SystemTestCase
10
+ have_browser = ActionDispatch::SystemTesting.const_defined?(:Browser)
11
+ if have_browser
12
+ driver = :selenium
13
+ driven_by driver, using: :headless_chrome, screen_size: [1920, 1080]
14
+ else
15
+ driver = :selenium_chrome_headless
16
+ driven_by driver, screen_size: [1920, 1080]
17
+ end
10
18
 
11
- test "render text" do
12
- assert_equal(:selenium, Capybara.current_driver)
13
- browser = self.class.driver.instance_variable_get(:@browser)
14
- assert_equal(:chrome, browser.type)
15
- visit("/items")
16
- assert_text("Hello")
19
+ test "render text" do
20
+ assert_equal(driver, Capybara.current_driver)
21
+ visit("/items")
22
+ assert_text("Hello")
23
+ end
17
24
  end
18
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-10 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -150,20 +150,6 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: puma
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: selenium-webdriver
169
155
  requirement: !ruby/object:Gem::Requirement