Skip to content

Commit 31e91ed

Browse files
committed
Fix format
1 parent e847941 commit 31e91ed

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

rb/lib/selenium/webdriver/common/print_options.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
2120
module Selenium
2221
module WebDriver
2322
# Represents options for printing a page.

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ def quit_driver
8080

8181
def app_server
8282
@app_server ||= begin
83-
app_server = RackServer.new(root.join('common/src/web').to_s, random_port)
84-
app_server.start
83+
app_server = RackServer.new(root.join('common/src/web').to_s, random_port)
84+
app_server.start
8585

86-
app_server
87-
end
86+
app_server
87+
end
8888
end
8989

9090
def remote_server

rb/spec/unit/selenium/webdriver/common/print_options_spec.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,40 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
2120
require File.expand_path('../spec_helper', __dir__)
2221
require 'selenium/webdriver/common/print_options'
2322

24-
2523
module Selenium
2624
module WebDriver
2725
describe PrintOptions do
28-
let(:options) { PrintOptions.new }
26+
let(:options) { described_class.new }
2927

3028
it 'has default values' do
3129
expect(options.orientation).to eq('portrait')
3230
expect(options.scale).to eq(1.0)
3331
expect(options.background).to be(false)
34-
expect(options.page_size).to eq({ width: 21.0, height: 29.7 })
35-
expect(options.margins).to eq({ top: 1.0, bottom: 1.0, left: 1.0, right: 1.0 })
32+
expect(options.page_size).to eq({width: 21.0, height: 29.7})
33+
expect(options.margins).to eq({top: 1.0, bottom: 1.0, left: 1.0, right: 1.0})
3634
end
3735

3836
it 'can set custom page size' do
39-
custom_size = { width: 25.0, height: 30.0 }
37+
custom_size = {width: 25.0, height: 30.0}
4038
options.page_size = custom_size
4139
expect(options.page_size).to eq(custom_size)
4240
end
4341

4442
it 'can set predefined page sizes using symbols' do
4543
options.page_size = :a4
46-
expect(options.page_size).to eq({ width: 21.0, height: 29.7 })
44+
expect(options.page_size).to eq({width: 21.0, height: 29.7})
4745

4846
options.page_size = :legal
49-
expect(options.page_size).to eq({ width: 21.59, height: 35.56 })
47+
expect(options.page_size).to eq({width: 21.59, height: 35.56})
5048

5149
options.page_size = :tabloid
52-
expect(options.page_size).to eq({ width: 27.94, height: 43.18 })
50+
expect(options.page_size).to eq({width: 27.94, height: 43.18})
5351

5452
options.page_size = :letter
55-
expect(options.page_size).to eq({ width: 21.59, height: 27.94 })
53+
expect(options.page_size).to eq({width: 21.59, height: 27.94})
5654
end
5755

5856
it 'raises an error for unsupported predefined page size symbols' do

0 commit comments

Comments
 (0)