Skip to content

Commit 14e8cdc

Browse files
committed
Failing test for #157
1 parent 4f3868a commit 14e8cdc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spec/integration/ruby_command_line_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,21 @@ class Dog
150150
expect(out).to_not include("Could not find filename")
151151
end
152152
end
153+
154+
it "does not say 'syntax ok' when a syntax error fires" do
155+
Dir.mktmpdir do |dir|
156+
tmpdir = Pathname(dir)
157+
script = tmpdir.join("script.rb")
158+
script.write <<~'EOM'
159+
break
160+
EOM
161+
162+
out = `ruby -I#{lib_dir} -rsyntax_suggest -e "require_relative '#{script}'" 2>&1`
163+
164+
expect($?.success?).to be_falsey
165+
expect(out.downcase).to_not include("syntax ok")
166+
puts out
167+
end
168+
end
153169
end
154170
end

0 commit comments

Comments
 (0)