browser 5.3.1 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/{FUNDING.yml → .github/FUNDING.yml} +2 -1
  3. data/.github/workflows/{tests.yml → ruby-tests.yml} +17 -17
  4. data/.rubocop.yml +3 -23
  5. data/CHANGELOG.md +6 -0
  6. data/LICENSE.md +20 -0
  7. data/README.md +10 -3
  8. data/browser.gemspec +4 -5
  9. data/gemfiles/{rails6_0.gemfile → 7_0.gemfile} +1 -1
  10. data/gemfiles/{rails6_1.gemfile → 7_1.gemfile} +1 -1
  11. data/lib/browser/accept_language.rb +1 -1
  12. data/lib/browser/base.rb +34 -29
  13. data/lib/browser/browser.rb +4 -3
  14. data/lib/browser/chrome.rb +4 -0
  15. data/lib/browser/device.rb +9 -9
  16. data/lib/browser/edge.rb +1 -1
  17. data/lib/browser/meta/base.rb +1 -1
  18. data/lib/browser/platform.rb +1 -1
  19. data/lib/browser/testing.rb +3 -3
  20. data/lib/browser/version.rb +1 -1
  21. data/lib/browser.rb +1 -1
  22. data/search_engines.yml +1 -0
  23. data/test/browser_test.rb +3 -3
  24. data/test/rails_test.rb +1 -1
  25. data/test/test_helper.rb +4 -2
  26. data/test/ua.yml +5 -0
  27. data/test/unit/accept_language_test.rb +1 -1
  28. data/test/unit/android_app_test.rb +3 -3
  29. data/test/unit/android_test.rb +17 -17
  30. data/test/unit/blackberry_test.rb +1 -1
  31. data/test/unit/bots_test.rb +15 -4
  32. data/test/unit/chrome_test.rb +1 -0
  33. data/test/unit/device_test.rb +25 -25
  34. data/test/unit/edge_test.rb +6 -0
  35. data/test/unit/electron_test.rb +1 -1
  36. data/test/unit/facebook_test.rb +3 -3
  37. data/test/unit/generic_test.rb +3 -3
  38. data/test/unit/instagram_test.rb +2 -2
  39. data/test/unit/internet_explorer_test.rb +18 -18
  40. data/test/unit/ios_app_test.rb +3 -3
  41. data/test/unit/ios_test.rb +12 -12
  42. data/test/unit/kindle_test.rb +15 -0
  43. data/test/unit/meta_test.rb +13 -13
  44. data/test/unit/platform_test.rb +33 -25
  45. data/test/unit/proxy_test.rb +2 -2
  46. data/test/unit/safari_test.rb +14 -9
  47. data/test/unit/snapchat_test.rb +3 -3
  48. data/test/unit/uc_browser_test.rb +1 -1
  49. data/test/unit/windows_test.rb +11 -11
  50. metadata +12 -77
@@ -109,7 +109,7 @@ class IosTest < Minitest::Test
109
109
  refute browser.platform.mac?
110
110
  end
111
111
 
112
- test "don't detect as two different versions" do
112
+ test "does not detect as two different versions" do
113
113
  browser = Browser.new(Browser["IOS8"])
114
114
  assert browser.platform.ios?(8)
115
115
  refute browser.platform.ios?(7)
@@ -119,22 +119,22 @@ class IosTest < Minitest::Test
119
119
  browser = Browser.new(Browser["IPHONE"])
120
120
  meta = browser.to_s
121
121
 
122
- assert meta.include?("webkit")
123
- assert meta.include?("ios")
124
- assert meta.include?("safari")
125
- assert meta.include?("safari3")
126
- assert meta.include?("mobile")
127
- refute meta.include?("tablet")
122
+ assert_includes meta, "webkit"
123
+ assert_includes meta, "ios"
124
+ assert_includes meta, "safari"
125
+ assert_includes meta, "safari3"
126
+ assert_includes meta, "mobile"
127
+ refute_includes meta, "tablet"
128
128
  end
129
129
 
130
130
  test "returns string representation for ipad" do
131
131
  browser = Browser.new(Browser["IPAD"])
132
132
  meta = browser.to_s
133
133
 
134
- assert meta.include?("webkit")
135
- assert meta.include?("ios")
136
- assert meta.include?("safari")
137
- assert meta.include?("tablet")
138
- refute meta.include?("mobile")
134
+ assert_includes meta, "webkit"
135
+ assert_includes meta, "ios"
136
+ assert_includes meta, "safari"
137
+ assert_includes meta, "tablet"
138
+ refute_includes meta, "mobile"
139
139
  end
140
140
  end
@@ -11,6 +11,21 @@ class KindleTest < Minitest::Test
11
11
  test "detects kindle fire" do
12
12
  browser = Browser.new(Browser["KINDLE_FIRE"])
13
13
  assert browser.webkit?
14
+
15
+ browser = Browser.new(Browser["KINDLE_SILK_TABLET"])
16
+ assert browser.webkit?
17
+
18
+ browser = Browser.new(Browser["KINDLE_SILK_DESKTOP"])
19
+ assert browser.webkit?
20
+
21
+ browser = Browser.new(Browser["KINDLE_SILK_MOBILE"])
22
+ assert browser.webkit?
23
+
24
+ browser = Browser.new(Browser["KINDLE_SILK_TABLET_1ST_GEN"])
25
+ assert browser.webkit?
26
+
27
+ browser = Browser.new(Browser["KINDLE_SILK_MOBILE_1ST_GEN"])
28
+ assert browser.webkit?
14
29
  end
15
30
 
16
31
  test "detects kindle fire hd" do
@@ -5,23 +5,23 @@ require "test_helper"
5
5
  class MetaTest < Minitest::Test
6
6
  class CustomRule < Browser::Meta::Base
7
7
  def meta
8
- "custom" if /Custom/.match?(browser.ua)
8
+ "custom" if browser.ua.include?("Custom")
9
9
  end
10
10
  end
11
11
 
12
- test "extend rules" do
12
+ test "extends rules" do
13
13
  Browser::Meta.rules.unshift(CustomRule)
14
14
 
15
15
  browser = Browser.new("Custom")
16
- assert browser.meta.include?("custom")
16
+ assert_includes browser.meta, "custom"
17
17
 
18
18
  browser = Browser.new("Safari")
19
- refute browser.meta.include?("custom")
19
+ refute_includes browser.meta, "custom"
20
20
 
21
21
  Browser::Meta.rules.shift
22
22
 
23
23
  browser = Browser.new("Custom")
24
- refute browser.meta.include?("custom")
24
+ refute_includes browser.meta, "custom"
25
25
  end
26
26
 
27
27
  test "sets meta" do
@@ -33,25 +33,25 @@ class MetaTest < Minitest::Test
33
33
  browser = Browser.new(Browser["CHROME"])
34
34
  meta = browser.to_s
35
35
 
36
- assert meta.include?("chrome")
37
- assert meta.include?("webkit")
38
- assert meta.include?("mac")
36
+ assert_includes meta, "chrome"
37
+ assert_includes meta, "webkit"
38
+ assert_includes meta, "mac"
39
39
  end
40
40
 
41
41
  test "returns string representation for mobile" do
42
42
  browser = Browser.new(Browser["BLACKBERRY"])
43
43
  meta = browser.to_s
44
44
 
45
- assert meta.include?("blackberry")
46
- assert meta.include?("mobile")
45
+ assert_includes meta, "blackberry"
46
+ assert_includes meta, "mobile"
47
47
  end
48
48
 
49
49
  test "returns string representation for unknown platform/device/browser" do
50
50
  browser = Browser.new("Unknown")
51
51
  meta = browser.to_s
52
52
 
53
- assert meta.include?("unknown_platform")
54
- assert meta.include?("unknown_device")
55
- assert meta.include?("unknown_browser")
53
+ assert_includes meta, "unknown_platform"
54
+ assert_includes meta, "unknown_device"
55
+ assert_includes meta, "unknown_browser"
56
56
  end
57
57
  end
@@ -13,7 +13,7 @@ class PlatformTest < Minitest::Test
13
13
  end
14
14
  end
15
15
 
16
- test "extend matchers" do
16
+ test "extends matchers" do
17
17
  Browser::Platform.matchers.unshift(CustomPlatform)
18
18
  platform = Browser::Platform.new("Custom")
19
19
  assert_equal :custom, platform.id
@@ -31,11 +31,11 @@ class PlatformTest < Minitest::Test
31
31
  test "implements ==" do
32
32
  platform = Browser::Platform.new(Browser["IOS9"])
33
33
 
34
- assert platform == :ios
35
- refute platform == :android
34
+ assert_operator platform, :==, :ios # rubocop:disable Minitest/AssertEqual
35
+ refute_equal platform, :android
36
36
  end
37
37
 
38
- test "detect unknown platforms" do
38
+ test "detects unknown platforms" do
39
39
  platform = Browser::Platform.new("Unknown")
40
40
 
41
41
  assert_equal "Unknown", platform.name
@@ -44,7 +44,7 @@ class PlatformTest < Minitest::Test
44
44
  assert platform.unknown?
45
45
  end
46
46
 
47
- test "detect ios (iPhone)" do
47
+ test "detects ios (iPhone)" do
48
48
  platform = Browser::Platform.new(Browser["IOS4"])
49
49
 
50
50
  assert_equal "iOS (iPhone)", platform.name
@@ -53,7 +53,7 @@ class PlatformTest < Minitest::Test
53
53
  assert_equal "4", platform.version
54
54
  end
55
55
 
56
- test "detect ios (iPad)" do
56
+ test "detects ios (iPad)" do
57
57
  platform = Browser::Platform.new(Browser["IOS9"])
58
58
 
59
59
  assert_equal "iOS (iPad)", platform.name
@@ -62,7 +62,7 @@ class PlatformTest < Minitest::Test
62
62
  assert_equal "9", platform.version
63
63
  end
64
64
 
65
- test "detect specific minor iOS (iPhone)" do
65
+ test "detects specific minor iOS (iPhone)" do
66
66
  platform = Browser::Platform.new(Browser["IOS8_3"])
67
67
 
68
68
  assert_equal "iOS (iPhone)", platform.name
@@ -72,7 +72,7 @@ class PlatformTest < Minitest::Test
72
72
  assert_equal "8.3", platform.version
73
73
  end
74
74
 
75
- test "detect specific patch iOS (iPhone)" do
75
+ test "detects specific patch iOS (iPhone)" do
76
76
  platform = Browser::Platform.new(Browser["IOS8_1_2"])
77
77
 
78
78
  assert_equal "iOS (iPhone)", platform.name
@@ -83,7 +83,7 @@ class PlatformTest < Minitest::Test
83
83
  assert_equal "8.1.2", platform.version
84
84
  end
85
85
 
86
- test "detect ios (iPod Touch)" do
86
+ test "detects ios (iPod Touch)" do
87
87
  platform = Browser::Platform.new(Browser["IPOD"])
88
88
 
89
89
  assert_equal "iOS (iPod)", platform.name
@@ -92,7 +92,7 @@ class PlatformTest < Minitest::Test
92
92
  assert_equal "0", platform.version
93
93
  end
94
94
 
95
- test "detect linux" do
95
+ test "detects linux" do
96
96
  platform = Browser::Platform.new(Browser["FIREFOX"])
97
97
 
98
98
  assert_equal "Generic Linux", platform.name
@@ -101,7 +101,7 @@ class PlatformTest < Minitest::Test
101
101
  assert_equal "0", platform.version
102
102
  end
103
103
 
104
- test "detect mac" do
104
+ test "detects mac" do
105
105
  platform = Browser::Platform.new(Browser["SAFARI"])
106
106
 
107
107
  assert_equal "Mac OS X", platform.name
@@ -111,17 +111,17 @@ class PlatformTest < Minitest::Test
111
111
  assert platform.mac?(["=10.6.4"])
112
112
  end
113
113
 
114
- test "return stub version for Mac user agent without version" do
114
+ test "returns stub version for Mac user agent without version" do
115
115
  platform = Browser::Platform.new("Macintosh")
116
116
  assert_equal "0", platform.version
117
117
  end
118
118
 
119
- test "detect mac names" do
119
+ test "detects mac names" do
120
120
  assert_equal "Mac OS X", Browser::Platform.new(Browser["MAC_OSX"]).name
121
121
  assert_equal "macOS", Browser::Platform.new(Browser["MAC_OS"]).name
122
122
  end
123
123
 
124
- test "detect firefox os" do
124
+ test "detects firefox os" do
125
125
  platform = Browser::Platform.new(Browser["FIREFOX_OS"])
126
126
 
127
127
  assert_equal "Firefox OS", platform.name
@@ -130,7 +130,7 @@ class PlatformTest < Minitest::Test
130
130
  assert_equal "0", platform.version
131
131
  end
132
132
 
133
- test "detect windows phone" do
133
+ test "detects windows phone" do
134
134
  platform = Browser::Platform.new(Browser["MS_EDGE_MOBILE"])
135
135
 
136
136
  assert_equal "Windows Phone", platform.name
@@ -139,7 +139,7 @@ class PlatformTest < Minitest::Test
139
139
  assert_equal "10.0", platform.version
140
140
  end
141
141
 
142
- test "detect windows mobile" do
142
+ test "detects windows mobile" do
143
143
  platform = Browser::Platform.new(Browser["WINDOWS_MOBILE"])
144
144
 
145
145
  assert_equal "Windows Mobile", platform.name
@@ -148,7 +148,7 @@ class PlatformTest < Minitest::Test
148
148
  assert_equal "0", platform.version
149
149
  end
150
150
 
151
- test "detect blackberry 10" do
151
+ test "detects blackberry 10" do
152
152
  platform = Browser::Platform.new(Browser["BLACKBERRY10"])
153
153
 
154
154
  assert_equal "BlackBerry", platform.name
@@ -157,7 +157,7 @@ class PlatformTest < Minitest::Test
157
157
  assert_equal "10.0.9.1675", platform.version
158
158
  end
159
159
 
160
- test "detect blackberry 4" do
160
+ test "detects blackberry 4" do
161
161
  platform = Browser::Platform.new(Browser["BLACKBERRY4"])
162
162
 
163
163
  assert_equal "BlackBerry", platform.name
@@ -166,7 +166,7 @@ class PlatformTest < Minitest::Test
166
166
  assert_equal "4.2.1", platform.version
167
167
  end
168
168
 
169
- test "detect blackberry 4 (other)" do
169
+ test "detects blackberry 4 (other)" do
170
170
  platform = Browser::Platform.new(Browser["BLACKBERRY"])
171
171
 
172
172
  assert_equal "BlackBerry", platform.name
@@ -175,7 +175,7 @@ class PlatformTest < Minitest::Test
175
175
  assert_equal "4.1.0", platform.version
176
176
  end
177
177
 
178
- test "detect blackberry 5" do
178
+ test "detects blackberry 5" do
179
179
  platform = Browser::Platform.new(Browser["BLACKBERRY5"])
180
180
 
181
181
  assert_equal "BlackBerry", platform.name
@@ -184,7 +184,7 @@ class PlatformTest < Minitest::Test
184
184
  assert_equal "5.0.0.93", platform.version
185
185
  end
186
186
 
187
- test "detect blackberry 6" do
187
+ test "detects blackberry 6" do
188
188
  platform = Browser::Platform.new(Browser["BLACKBERRY6"])
189
189
 
190
190
  assert_equal "BlackBerry", platform.name
@@ -193,7 +193,7 @@ class PlatformTest < Minitest::Test
193
193
  assert_equal "6.0.0.141", platform.version
194
194
  end
195
195
 
196
- test "detect blackberry 7" do
196
+ test "detects blackberry 7" do
197
197
  platform = Browser::Platform.new(Browser["BLACKBERRY7"])
198
198
 
199
199
  assert_equal "BlackBerry", platform.name
@@ -202,7 +202,7 @@ class PlatformTest < Minitest::Test
202
202
  assert_equal "7.0.0.1", platform.version
203
203
  end
204
204
 
205
- test "detect android" do
205
+ test "detects android" do
206
206
  platform = Browser::Platform.new(Browser["ANDROID_CUPCAKE"])
207
207
 
208
208
  assert_equal "Android", platform.name
@@ -211,7 +211,7 @@ class PlatformTest < Minitest::Test
211
211
  assert_equal "1.5", platform.version
212
212
  end
213
213
 
214
- test "detect chrome os" do
214
+ test "detects chrome os" do
215
215
  platform = Browser::Platform.new(Browser["CHROME_OS"])
216
216
 
217
217
  assert_equal "Chrome OS", platform.name
@@ -221,10 +221,18 @@ class PlatformTest < Minitest::Test
221
221
  assert_equal "3701.81.0", platform.version
222
222
  end
223
223
 
224
- test "detect adobe air" do
224
+ test "detects adobe air" do
225
225
  platform = Browser::Platform.new(Browser["ADOBE_AIR"])
226
226
 
227
227
  assert platform.adobe_air?
228
228
  assert platform.adobe_air?(%w[>=13 <14])
229
229
  end
230
+
231
+ test "implements default match?" do
232
+ matcher_class = Class.new(Browser::Platform::Base)
233
+ Browser::Platform.matchers.unshift(matcher_class)
234
+ platform = Browser::Platform.new("")
235
+
236
+ assert platform.unknown?
237
+ end
230
238
  end
@@ -10,11 +10,11 @@ class ProxyTest < Minitest::Test
10
10
  ].each do |name|
11
11
  ua = Browser[name]
12
12
 
13
- test "detect #{name} as proxy" do
13
+ test "detects #{name} as proxy" do
14
14
  browser = Browser.new(ua)
15
15
 
16
16
  assert browser.proxy?
17
- assert browser.meta.include?("proxy")
17
+ assert_includes browser.meta, "proxy"
18
18
  end
19
19
  end
20
20
  end
@@ -3,7 +3,7 @@
3
3
  require "test_helper"
4
4
 
5
5
  class SafariTest < Minitest::Test
6
- test "detect safari 3" do
6
+ test "detects safari 3" do
7
7
  browser = Browser.new(Browser["SAFARI3"])
8
8
 
9
9
  assert browser.safari?
@@ -12,7 +12,7 @@ class SafariTest < Minitest::Test
12
12
  assert_equal "3.0.3", browser.full_version
13
13
  end
14
14
 
15
- test "detect safari 4" do
15
+ test "detects safari 4" do
16
16
  browser = Browser.new(Browser["SAFARI4"])
17
17
 
18
18
  assert browser.safari?
@@ -21,7 +21,7 @@ class SafariTest < Minitest::Test
21
21
  assert_equal "4.0.3", browser.full_version
22
22
  end
23
23
 
24
- test "detect safari 5" do
24
+ test "detects safari 5" do
25
25
  browser = Browser.new(Browser["SAFARI5"])
26
26
 
27
27
  assert browser.safari?
@@ -30,7 +30,7 @@ class SafariTest < Minitest::Test
30
30
  assert_equal "5.0.3", browser.full_version
31
31
  end
32
32
 
33
- test "detect safari 6" do
33
+ test "detects safari 6" do
34
34
  browser = Browser.new(Browser["SAFARI6"])
35
35
 
36
36
  assert browser.safari?
@@ -39,7 +39,7 @@ class SafariTest < Minitest::Test
39
39
  assert_equal "6.0", browser.full_version
40
40
  end
41
41
 
42
- test "detect safari 7" do
42
+ test "detects safari 7" do
43
43
  browser = Browser.new(Browser["SAFARI7"])
44
44
 
45
45
  assert browser.safari?
@@ -48,7 +48,7 @@ class SafariTest < Minitest::Test
48
48
  assert_equal "7.0", browser.full_version
49
49
  end
50
50
 
51
- test "detect safari 8" do
51
+ test "detects safari 8" do
52
52
  browser = Browser.new(Browser["SAFARI8"])
53
53
 
54
54
  assert browser.safari?
@@ -57,7 +57,7 @@ class SafariTest < Minitest::Test
57
57
  assert_equal "8.0", browser.full_version
58
58
  end
59
59
 
60
- test "detect safari 9" do
60
+ test "detects safari 9" do
61
61
  browser = Browser.new(Browser["SAFARI9"])
62
62
 
63
63
  assert browser.safari?
@@ -66,13 +66,13 @@ class SafariTest < Minitest::Test
66
66
  assert_equal "9.0.2", browser.full_version
67
67
  end
68
68
 
69
- test "detect web app mode" do
69
+ test "detects web app mode" do
70
70
  browser = Browser.new(Browser["SAFARI_IPHONE_WEBAPP_MODE"])
71
71
 
72
72
  assert browser.safari_webapp_mode?
73
73
  end
74
74
 
75
- test "reject regular safari as web app mode" do
75
+ test "rejects regular safari as web app mode" do
76
76
  browser = Browser.new(Browser["SAFARI9"])
77
77
 
78
78
  refute browser.safari_webapp_mode?
@@ -93,4 +93,9 @@ class SafariTest < Minitest::Test
93
93
  browser = Browser.new(Browser["SAFARI9"])
94
94
  assert browser.safari?(%w[>=9.0 <10])
95
95
  end
96
+
97
+ test "does not detect as chromium" do
98
+ browser = Browser.new(Browser["SAFARI9"])
99
+ refute browser.chromium_based?
100
+ end
96
101
  end
@@ -8,7 +8,7 @@ class SnapchatTest < Minitest::Test
8
8
 
9
9
  assert_equal "Snapchat", browser.name
10
10
  assert browser.snapchat?
11
- assert :snapchat, browser.id
11
+ assert_equal :snapchat, browser.id
12
12
  assert_equal "10.69.5.72", browser.full_version
13
13
  assert_equal "10", browser.version
14
14
  end
@@ -18,7 +18,7 @@ class SnapchatTest < Minitest::Test
18
18
 
19
19
  assert_equal "Snapchat", browser.name
20
20
  assert browser.snapchat?
21
- assert :snapchat, browser.id
21
+ assert_equal :snapchat, browser.id
22
22
  assert_equal "10.70.0.0", browser.full_version
23
23
  assert_equal "10", browser.version
24
24
  end
@@ -28,7 +28,7 @@ class SnapchatTest < Minitest::Test
28
28
 
29
29
  assert_equal "Snapchat", browser.name
30
30
  assert browser.snapchat?
31
- assert :snapchat, browser.id
31
+ assert_equal :snapchat, browser.id
32
32
  assert_equal "10.70.0.0", browser.full_version
33
33
  assert_equal "10", browser.version
34
34
  end
@@ -6,7 +6,7 @@ class UcBrowserTest < Minitest::Test
6
6
  test "detects UC Browser" do
7
7
  browser = Browser.new(Browser["UC_BROWSER"])
8
8
  assert browser.uc_browser?
9
- assert_equal browser.name, "UCBrowser"
9
+ assert_equal "UCBrowser", browser.name
10
10
  end
11
11
 
12
12
  test "detects version by range" do
@@ -8,7 +8,7 @@ class WindowsTest < Minitest::Test
8
8
  assert browser.platform.windows_x64?
9
9
  refute browser.platform.windows_wow64?
10
10
  assert browser.platform.windows_x64_inclusive?
11
- assert_equal browser.platform.version, "6.2"
11
+ assert_equal "6.2", browser.platform.version
12
12
  end
13
13
 
14
14
  test "detects windows wow64" do
@@ -16,14 +16,14 @@ class WindowsTest < Minitest::Test
16
16
  refute browser.platform.windows_x64?
17
17
  assert browser.platform.windows_wow64?
18
18
  assert browser.platform.windows_x64_inclusive?
19
- assert_equal browser.platform.version, "6.3"
19
+ assert_equal "6.3", browser.platform.version
20
20
  end
21
21
 
22
22
  test "detects windows_2000" do
23
23
  browser = Browser.new(Browser["WINDOWS_2000"])
24
24
 
25
25
  assert browser.platform.windows?
26
- assert_equal browser.platform.version, "5.0"
26
+ assert_equal "5.0", browser.platform.version
27
27
  assert browser.platform.windows?(["=5.0"])
28
28
  end
29
29
 
@@ -31,7 +31,7 @@ class WindowsTest < Minitest::Test
31
31
  browser = Browser.new(Browser["WINDOWS_2000_SP1"])
32
32
 
33
33
  assert browser.platform.windows?
34
- assert_equal browser.platform.version, "5.01"
34
+ assert_equal "5.01", browser.platform.version
35
35
  assert browser.platform.windows?(["=5.01"])
36
36
  end
37
37
 
@@ -40,7 +40,7 @@ class WindowsTest < Minitest::Test
40
40
 
41
41
  assert browser.platform.windows?
42
42
  assert browser.platform.windows_xp?
43
- assert_equal browser.platform.version, "5.1"
43
+ assert_equal "5.1", browser.platform.version
44
44
  assert browser.platform.windows?(["=5.1"])
45
45
  end
46
46
 
@@ -50,7 +50,7 @@ class WindowsTest < Minitest::Test
50
50
  assert browser.platform.windows?
51
51
  assert browser.platform.windows_xp?
52
52
  assert browser.platform.windows_x64?
53
- assert_equal browser.platform.version, "5.2"
53
+ assert_equal "5.2", browser.platform.version
54
54
  assert browser.platform.windows?(["=5.2"])
55
55
  end
56
56
 
@@ -59,7 +59,7 @@ class WindowsTest < Minitest::Test
59
59
 
60
60
  assert browser.platform.windows?
61
61
  assert browser.platform.windows_vista?
62
- assert_equal browser.platform.version, "6.0"
62
+ assert_equal "6.0", browser.platform.version
63
63
  assert browser.platform.windows?(["=6.0"])
64
64
  end
65
65
 
@@ -68,7 +68,7 @@ class WindowsTest < Minitest::Test
68
68
 
69
69
  assert browser.platform.windows?
70
70
  assert browser.platform.windows7?
71
- assert_equal browser.platform.version, "6.1"
71
+ assert_equal "6.1", browser.platform.version
72
72
  assert browser.platform.windows?(["=6.1"])
73
73
  end
74
74
 
@@ -78,7 +78,7 @@ class WindowsTest < Minitest::Test
78
78
  assert browser.platform.windows?
79
79
  assert browser.platform.windows8?
80
80
  refute browser.platform.windows8_1?
81
- assert_equal browser.platform.version, "6.2"
81
+ assert_equal "6.2", browser.platform.version
82
82
  assert browser.platform.windows?(["=6.2"])
83
83
  end
84
84
 
@@ -88,7 +88,7 @@ class WindowsTest < Minitest::Test
88
88
  assert browser.platform.windows?
89
89
  assert browser.platform.windows8?
90
90
  assert browser.platform.windows8_1?
91
- assert_equal browser.platform.version, "6.3"
91
+ assert_equal "6.3", browser.platform.version
92
92
  assert browser.platform.windows?(["=6.3"])
93
93
  end
94
94
 
@@ -97,7 +97,7 @@ class WindowsTest < Minitest::Test
97
97
 
98
98
  assert browser.platform.windows?
99
99
  assert browser.platform.windows10?
100
- assert_equal browser.platform.version, "10.0"
100
+ assert_equal "10.0", browser.platform.version
101
101
  assert browser.platform.windows?(["=10.0"])
102
102
  end
103
103