Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix standardrb errors + minitest references in tests #104

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kiba.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "awesome_print"
gem.add_development_dependency "minitest-focus"
gem.add_development_dependency "standard"
gem.add_development_dependency "csv"
end
2 changes: 1 addition & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "kiba"

if ENV["CI"] == "true"
puts "Running with MiniTest version #{MiniTest::VERSION}"
puts "Running with Minitest version #{Minitest::VERSION}"
end

class Kiba::Test < Minitest::Test
Expand Down
10 changes: 5 additions & 5 deletions test/shared_runner_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_pre_process_runs_once
def test_pre_process_runs_before_source_is_instantiated
calls = []

mock_source_class = MiniTest::Mock.new
mock_source_class = Minitest::Mock.new
mock_source_class.expect(:new, TestEnumerableSource.new([1, 2, 3])) do
calls << :source_instantiated
end
Expand All @@ -80,9 +80,9 @@ def test_pre_process_runs_before_source_is_instantiated

def test_no_error_raised_if_destination_close_not_implemented
# NOTE: this fake destination does not implement `close`
destination_instance = MiniTest::Mock.new
destination_instance = Minitest::Mock.new

mock_destination_class = MiniTest::Mock.new
mock_destination_class = Minitest::Mock.new
mock_destination_class.expect(:new, destination_instance)

control = Kiba::Control.new
Expand All @@ -92,9 +92,9 @@ def test_no_error_raised_if_destination_close_not_implemented
end

def test_destination_close_called_if_defined
destination_instance = MiniTest::Mock.new
destination_instance = Minitest::Mock.new
destination_instance.expect(:close, nil)
mock_destination_class = MiniTest::Mock.new
mock_destination_class = Minitest::Mock.new
mock_destination_class.expect(:new, destination_instance)

control = Kiba::Control.new
Expand Down
4 changes: 2 additions & 2 deletions test/support/shared_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def shared_tests_for(desc, &block)
@@shared_tests[desc] = block
end

def shared_tests(desc, *args)
class_exec(*args, &@@shared_tests.fetch(desc))
def shared_tests(desc, *)
class_exec(*, &@@shared_tests.fetch(desc))
end
end
Loading