Skip to content

Commit aab3e81

Browse files
committed
Fix formatting and style in specs
1 parent 0305938 commit aab3e81

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

spec/ruby/core/exception/syntax_error_spec.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
require_relative '../../spec_helper'
22

3-
43
ruby_version_is "3.2" do
54
describe "SyntaxError#path" do
65
it "returns the file path provided to eval" do
7-
expected = 'speccing.rb'
6+
filename = "speccing.rb"
7+
88
-> {
9-
eval('if true', TOPLEVEL_BINDING, expected)
9+
eval("if true", TOPLEVEL_BINDING, filename)
1010
}.should raise_error(SyntaxError) { |e|
11-
e.path.should == expected
11+
e.path.should == filename
1212
}
1313
end
1414

1515
it "returns the file path that raised an exception" do
16-
expected_path = fixture(__FILE__, 'syntax_error.rb')
16+
expected_path = fixture(__FILE__, "syntax_error.rb")
17+
1718
-> {
18-
require_relative 'fixtures/syntax_error'
19-
}.should raise_error(SyntaxError) {|e| e.path.should == expected_path }
19+
require_relative "fixtures/syntax_error"
20+
}.should raise_error(SyntaxError) { |e| e.path.should == expected_path }
2021
end
2122

2223
it "returns nil when constructed directly" do

0 commit comments

Comments
 (0)