Skip to content

Commit 7754e02

Browse files
committed
fix spec descriptions
1 parent 8d27fda commit 7754e02

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

spec/lib/ruby_dep/warning_spec.rb

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,42 @@
66
stub_const('RUBY_VERSION', ruby_version)
77
end
88

9-
context 'with an up-to-date Ruby' do
10-
let(:ruby_version) { '2.3.1' }
11-
it '#show_warnings' do
12-
expect(STDERR).to_not receive(:puts)
13-
subject.show_warnings
9+
describe '#show_warnings' do
10+
context 'with an up-to-date Ruby' do
11+
let(:ruby_version) { '2.3.1' }
12+
it 'does not show warning' do
13+
expect(STDERR).to_not receive(:puts)
14+
subject.show_warnings
15+
end
1416
end
15-
end
1617

17-
context 'with a secure but buggy Ruby' do
18-
let(:ruby_version) { '2.2.4' }
19-
it '#show_warnings' do
20-
expect(STDERR).to receive(:puts).with(
21-
'RubyDep: WARNING: your Ruby is outdated/buggy. Please upgrade.')
22-
subject.show_warnings
18+
context 'with a secure but buggy Ruby' do
19+
let(:ruby_version) { '2.2.4' }
20+
it 'shows warning about bugs' do
21+
expect(STDERR).to receive(:puts).with(
22+
'RubyDep: WARNING: your Ruby is outdated/buggy. Please upgrade.')
23+
subject.show_warnings
24+
end
2325
end
24-
end
2526

26-
context 'with an insecure Ruby' do
27-
let(:ruby_version) { '2.2.3' }
28-
it '#show_warnings' do
29-
expect(STDERR).to receive(:puts).with(
30-
'RubyDep: WARNING: your Ruby has security vulnerabilities!'\
31-
' Please upgrade!')
32-
subject.show_warnings
27+
context 'with an insecure Ruby' do
28+
let(:ruby_version) { '2.2.3' }
29+
it 'shows warning about vulnerability' do
30+
expect(STDERR).to receive(:puts).with(
31+
'RubyDep: WARNING: your Ruby has security vulnerabilities!'\
32+
' Please upgrade!')
33+
subject.show_warnings
34+
end
3335
end
34-
end
3536

36-
context 'with an unsupported Ruby' do
37-
let(:ruby_version) { '1.9.3' }
38-
it '#show_warnings' do
39-
expect(STDERR).to receive(:puts).with(
40-
'RubyDep: WARNING: your Ruby has security vulnerabilities!'\
41-
' Please upgrade!')
42-
subject.show_warnings
37+
context 'with an unsupported Ruby' do
38+
let(:ruby_version) { '1.9.3' }
39+
it 'shows warning about vulnerability' do
40+
expect(STDERR).to receive(:puts).with(
41+
'RubyDep: WARNING: your Ruby has security vulnerabilities!'\
42+
' Please upgrade!')
43+
subject.show_warnings
44+
end
4345
end
4446
end
4547
end

0 commit comments

Comments
 (0)