mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
Bump up syntax_suggest-1.1.0
This commit is contained in:
parent
0c908fa681
commit
e517ba2e5b
27 changed files with 967 additions and 205 deletions
|
@ -46,6 +46,24 @@ module SyntaxSuggest
|
|||
end
|
||||
end
|
||||
|
||||
# Since Ruby 3.2 includes syntax_suggest as a default gem, we might accidentally
|
||||
# be requiring the default gem instead of this library under test. Assert that's
|
||||
# not the case
|
||||
it "tests current version of syntax_suggest" do
|
||||
Dir.mktmpdir do |dir|
|
||||
tmpdir = Pathname(dir)
|
||||
script = tmpdir.join("script.rb")
|
||||
contents = <<~'EOM'
|
||||
puts "suggest_version is #{SyntaxSuggest::VERSION}"
|
||||
EOM
|
||||
script.write(contents)
|
||||
|
||||
out = `#{ruby} -I#{lib_dir} -rsyntax_suggest/version #{script} 2>&1`
|
||||
|
||||
expect(out).to include("suggest_version is #{SyntaxSuggest::VERSION}").once
|
||||
end
|
||||
end
|
||||
|
||||
it "detects require error and adds a message with auto mode" do
|
||||
Dir.mktmpdir do |dir|
|
||||
tmpdir = Pathname(dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue