Skip to content

Commit 6b3f75e

Browse files
committed
Bump aruba, byebug, cucumber, fakefs, rake, reek dependencies
Also corrected multiple Minitest/EmptyLineBeforeAssertionMethods issues flagged by rubocop-minitst.
1 parent 65e5be4 commit 6b3f75e

21 files changed

+72
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.9.2...main)
22

3+
* [CHANGE] Bump aruba, byebug, cucumber, fakefs, rake, reek dependencies (by [@faisal][])
34
* [CHANGE] Update CI checkout action to v4 (by [@faisal][])
45

56
# v4.9.2 / 2025-04-08 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.9.1...v4.9.2)

rubycritic.gemspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,30 @@ Gem::Specification.new do |spec|
3535
spec.add_dependency 'launchy', '>= 2.5.2'
3636
spec.add_dependency 'parser', '>= 3.3.0.5'
3737
spec.add_dependency 'rainbow', '~> 3.1.1'
38-
spec.add_dependency 'reek', '~> 6.4.0', '< 7.0'
38+
spec.add_dependency 'reek', '~> 6.5.0', '< 7.0'
3939
spec.add_dependency 'rexml'
4040
spec.add_dependency 'ruby_parser', '~> 3.21'
4141
spec.add_dependency 'simplecov', '>= 0.22.0'
4242
spec.add_dependency 'tty-which', '~> 0.5.0'
4343
spec.add_dependency 'virtus', '~> 2.0'
4444

45-
spec.add_development_dependency 'aruba', '~> 2.3.0'
45+
spec.add_development_dependency 'aruba', '~> 2.3.1', '>= 2.3.1'
4646
spec.add_development_dependency 'bundler', '>= 2.0.0'
4747
if RUBY_PLATFORM == 'java'
4848
spec.add_development_dependency 'pry-debugger-jruby'
4949
else
50-
spec.add_development_dependency 'byebug', '~> 11.0', '>= 10.0'
50+
spec.add_development_dependency 'byebug', '~> 12.0', '>= 10.0'
5151
end
52-
spec.add_development_dependency 'cucumber', '~> 9.2.1', '!= 9.0.0'
52+
spec.add_development_dependency 'cucumber', '~> 10.0.0', '!= 9.0.0'
5353
spec.add_development_dependency 'diff-lcs', '~> 1.3'
54-
spec.add_development_dependency 'fakefs', '~> 2.6.0'
54+
spec.add_development_dependency 'fakefs', '~> 3.0.0'
5555
spec.add_development_dependency 'irb'
5656
spec.add_development_dependency 'mdl', '~> 0.13.0', '>= 0.12.0'
5757
spec.add_development_dependency 'minitest', '~> 5.25.2', '>= 5.3.0'
5858
spec.add_development_dependency 'minitest-around', '~> 0.5.0', '>= 0.4.0'
5959
spec.add_development_dependency 'mocha', '~> 2.7.1'
6060
spec.add_development_dependency 'ostruct'
61-
spec.add_development_dependency 'rake', '~> 13.2.0', '>= 11.0.0'
61+
spec.add_development_dependency 'rake', '~> 13.3.0', '>= 11.0.0'
6262
spec.add_development_dependency 'rdoc'
6363
spec.add_development_dependency 'rexml', '>= 3.2.0'
6464
spec.add_development_dependency 'rubocop', '>= 1.72.0', '< 2.0'

test/lib/rubycritic/analysers/helpers/methods_counter_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,23 @@
88
context 'when a file contains Ruby code' do
99
it 'calculates the number of methods' do
1010
analysed_module = AnalysedModuleDouble.new(path: 'test/samples/methods_count.rb')
11+
1112
_(RubyCritic::MethodsCounter.new(analysed_module).count).must_equal 2
1213
end
1314
end
1415

1516
context 'when a file is empty' do
1617
it 'returns 0 as the number of methods' do
1718
analysed_module = AnalysedModuleDouble.new(path: 'test/samples/empty.rb')
19+
1820
_(RubyCritic::MethodsCounter.new(analysed_module).count).must_equal 0
1921
end
2022
end
2123

2224
context 'when a file has no method' do
2325
it 'does not blow up and returns 0 as the number of methods' do
2426
analysed_module = AnalysedModuleDouble.new(path: 'test/samples/no_methods.rb')
27+
2528
capture_output_streams do
2629
_(RubyCritic::MethodsCounter.new(analysed_module).count).must_equal 0
2730
end

test/lib/rubycritic/analysers/helpers/modules_locator_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
pathname: Pathname.new('test/samples/module_names.rb'),
1414
methods_count: 1
1515
)
16+
1617
_(RubyCritic::ModulesLocator.new(analysed_module).names)
1718
.must_equal ['Foo', 'Foo::Bar', 'Foo::Baz', 'Foo::Qux', 'Foo::Quux::Corge']
1819
end
@@ -24,6 +25,7 @@
2425
pathname: Pathname.new('test/samples/empty.rb'),
2526
methods_count: 1
2627
)
28+
2729
_(RubyCritic::ModulesLocator.new(analysed_module).names).must_equal ['Empty']
2830
end
2931
end
@@ -34,6 +36,7 @@
3436
pathname: Pathname.new('test/samples/no_methods.rb'),
3537
methods_count: 0
3638
)
39+
3740
capture_output_streams do
3841
_(RubyCritic::ModulesLocator.new(analysed_module).names).must_equal ['Foo::NoMethods']
3942
end

test/lib/rubycritic/analysers/smells/flay_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@
2121

2222
it 'creates smells with messages' do
2323
smell = @analysed_modules.first.smells.first
24+
2425
_(smell.message).must_be_instance_of String
2526
end
2627

2728
it 'creates smells with scores' do
2829
smell = @analysed_modules.first.smells.first
30+
2931
_(smell.score).must_be_kind_of Numeric
3032
end
3133

3234
it 'creates smells with more than one location' do
3335
smell = @analysed_modules.first.smells.first
36+
3437
_(smell.multiple_locations?).must_equal true
3538
end
3639

test/lib/rubycritic/analysers/smells/flog_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717

1818
it 'creates smells with messages' do
1919
smell = @analysed_module.smells.first
20+
2021
_(smell.message).must_be_instance_of String
2122
end
2223

2324
it 'creates smells with scores' do
2425
smell = @analysed_module.smells.first
26+
2527
_(smell.score).must_be :>, 0
2628
end
2729
end

test/lib/rubycritic/analysers/smells/reek_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@
1818

1919
it 'respects the .reek file' do
2020
messages = @analysed_module.smells.map(&:message)
21+
2122
_(messages).wont_include "has the parameter name 'a'"
2223
end
2324

2425
it 'creates smells with messages' do
2526
first_smell = @analysed_module.smells.first
27+
2628
_(first_smell.message).must_equal "has boolean parameter 'reek'"
2729

2830
last_smell = @analysed_module.smells.last
31+
2932
_(last_smell.message).must_equal 'has no descriptive comment'
3033
end
3134
end

test/lib/rubycritic/browser_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
describe '#open' do
1313
it 'should be open report with launch browser' do
1414
Launchy.stubs(:open).returns(true)
15+
1516
_(@browser.open).must_equal true
1617
end
1718
end

test/lib/rubycritic/commands/compare_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def abort(str); end
6969
comparison.expects(:abort).once
7070

7171
status_reporter = comparison.execute
72+
7273
_(status_reporter.score).must_equal RubyCritic::Config.feature_branch_score
7374
_(status_reporter.score).wont_equal RubyCritic::Config.base_branch_score
7475
_(status_reporter.status_message).must_equal "Score: #{RubyCritic::Config.feature_branch_score}"
@@ -87,6 +88,7 @@ def abort(str); end
8788
end
8889
RubyCritic::SourceControlSystem::Git.stub(:switch_branch, copy_proc) do
8990
status_reporter = RubyCritic::Command::Compare.new(options).execute
91+
9092
_(status_reporter.score).must_equal RubyCritic::Config.feature_branch_score
9193
_(status_reporter.score).must_equal RubyCritic::Config.base_branch_score
9294
_(status_reporter.status_message).must_equal "Score: #{RubyCritic::Config.feature_branch_score}"

test/lib/rubycritic/commands/status_reporter_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222

2323
it 'accept a score' do
2424
@reporter.score = 50.0
25+
2526
_(@reporter.status).must_equal success_status
2627
_(@reporter.status_message).must_equal 'Score: 50.0'
2728
end
2829

2930
it 'should format the score' do
3031
@reporter.score = 98.95258620689656
32+
3133
_(@reporter.status).must_equal success_status
3234
_(@reporter.status_message).must_equal 'Score: 98.95'
3335
end
@@ -49,12 +51,14 @@
4951
let(:score) { 98.0 }
5052
it 'should return the correct status' do
5153
@reporter.score = score
54+
5255
_(@reporter.status).must_equal score_below_minimum
5356
_(@reporter.status_message).must_equal 'Score (98.0) is below the minimum 99.0'
5457
end
5558

5659
it 'should format the score' do
5760
@reporter.score = 98.95258620689656
61+
5862
_(@reporter.status).must_equal score_below_minimum
5963
_(@reporter.status_message).must_equal 'Score (98.95) is below the minimum 99.0'
6064
end
@@ -64,6 +68,7 @@
6468
let(:score) { 99.0 }
6569
it 'should return the correct status' do
6670
@reporter.score = score
71+
6772
_(@reporter.status).must_equal success_status
6873
_(@reporter.status_message).must_equal 'Score: 99.0'
6974
end
@@ -73,6 +78,7 @@
7378
let(:score) { 100.0 }
7479
it 'should return the correct status' do
7580
@reporter.score = score
81+
7682
_(@reporter.status).must_equal success_status
7783
_(@reporter.status_message).must_equal 'Score: 100.0'
7884
end

0 commit comments

Comments
 (0)