Skip to content

Commit 61467d6

Browse files
committed
add tests for JRuby head version
1 parent 2f31fd3 commit 61467d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spec/lib/ruby_dep/warning_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ def rquote(str)
116116
end
117117
end
118118

119+
context 'with JRuby head' do
120+
context 'when the JRuby is not known to be vulnerable' do
121+
let(:ruby_version) { '2.3.0' }
122+
let(:ruby_engine) { 'jruby' }
123+
it 'does not show warning about vulnerability' do
124+
expect(STDERR).to_not have_received(:puts)
125+
end
126+
127+
it 'does not show a recommendation' do
128+
expect(STDERR).to_not have_received(:puts).with(
129+
/RubyDep: Your Ruby is:/)
130+
expect(STDERR).to_not have_received(:puts).with(/Recommendation:/)
131+
end
132+
end
133+
end
134+
119135
context 'with an untracked ruby' do
120136
context 'when the Ruby is not listed' do
121137
let(:ruby_version) { '1.2.3' }

0 commit comments

Comments
 (0)