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 +4 -4
- data/doc/text/news.md +12 -1
- data/lib/test/unit/rails/test_help.rb +13 -9
- data/lib/test/unit/rails/version.rb +1 -1
- data/test/test_system_test_case.rb +19 -12
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d63ed3c2b2cae154e55f62d72c175e08f42ca58e2577366cba2b9a757461e68
|
4
|
+
data.tar.gz: 6410d8133ebd8c89195d7d21123cc4fbe787f19f80940e92a0452cf158cd62f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b477283372f79080ebe2c9b44acb77168b6d7612eeede9b718ef9598f86d06081a2a07fcf88e2eca53ba368eb840d6f7d1298428cee6c23cbc51c66c68e7bdd
|
7
|
+
data.tar.gz: 1957ba27a3f016eded52be95fdb176e7892fa842a2b567ed43cac07da6ff78dab92be1321140ebf651febdf202bc9de37fc258489672c140ef62ac52b720a85b
|
data/doc/text/news.md
CHANGED
@@ -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#
|
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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
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
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
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
|
@@ -1,18 +1,25 @@
|
|
1
1
|
require "test_helper"
|
2
2
|
|
3
|
-
if
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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.
|
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-
|
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
|