Skip to content
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.1
3.4.3
3 changes: 1 addition & 2 deletions 00_setup/test/test_try_out.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'test_helper'
require '01_try_out'

class TestTryOut < MiniTest::Test
class TestTryOut < Minitest::Test
def test_first_last_name
target = TryOut.new("John", "Wick")
assert_equal "John Wick", target.full_name
Expand Down Expand Up @@ -48,4 +48,3 @@ def test_too_many_arguments
assert_raises (ArgumentError) {TryOut.new("John", "Milton", "Cage", "Jr")}
end
end

2 changes: 1 addition & 1 deletion 02_object_model/test/test_hierarchy.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'test_helper'
require '02_hierarchy'

class TestHierarchy < MiniTest::Test
class TestHierarchy < Minitest::Test
def test_c1_ancestors
assert_equal [C1, M1], C1.ancestors.first(2)
end
Expand Down
2 changes: 1 addition & 1 deletion 02_object_model/test/test_hoge.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'test_helper'
require '01_hoge'

class TestHoge < MiniTest::Test
class TestHoge < Minitest::Test
def test_hoge_in_string
assert_equal "hoge","hoge".hoge
end
Expand Down
2 changes: 1 addition & 1 deletion 03_method/test/test_define.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require '02_define'
require 'securerandom'

class TestDefine < MiniTest::Test
class TestDefine < Minitest::Test

begin
class A3
Expand Down
2 changes: 1 addition & 1 deletion 03_method/test/test_method_first_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'securerandom'
require '01_method_first_step'

class TestMethodFirstStep < MiniTest::Test
class TestMethodFirstStep < Minitest::Test
def test_hello
assert_equal F1.new.hello, 'hello'
end
Expand Down
3 changes: 1 addition & 2 deletions 03_method/test/test_try_over3_3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class TestTryOver03Q1 < Minitest::Test
def test_q1_called_run_test
a1 = TryOver3::A1.new
mock = MiniTest::Mock.new
mock = Minitest::Mock.new
a1.stub(:run_test, mock) do
a1.test_hoge
end
Expand Down Expand Up @@ -121,4 +121,3 @@ def orignal_accessor_included_instance
end.new
end
end

2 changes: 1 addition & 1 deletion 04_block/test/test_block_first_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.call(&block)

require '01_block_first_step'

class TestBlockFirstStep < MiniTest::Test
class TestBlockFirstStep < Minitest::Test
def test_my_math
assert_equal 4, MyMath.new.two_times { 2 }
end
Expand Down
12 changes: 6 additions & 6 deletions 04_block/test/test_evil_mailbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
require '02_evil_mailbox'
require 'securerandom'

class TestEvilMailbox < MiniTest::Test
class TestEvilMailbox < Minitest::Test
def evil_mailbox(&block)
mock = MiniTest::Mock.new
mock = Minitest::Mock.new
mock.instance_eval(&block) if block_given?
[EvilMailbox.new(mock), mock]
end
Expand Down Expand Up @@ -58,15 +58,15 @@ def test_send_mail_exec_block_with_result_false

def test_mail_object_auth
secret_string = SecureRandom.hex
mock = MiniTest::Mock.new
mock = Minitest::Mock.new
mock.expect :auth, true, [String]
EvilMailbox.new(mock, secret_string)
mock.verify
end

def test_send_mail_with_secret_string
secret_string = SecureRandom.hex
mock = MiniTest::Mock.new
mock = Minitest::Mock.new
mock.expect :auth, true, [String]
mock.expect :send_mail, true, ["ppyd", "hello#{secret_string}"]
mb = EvilMailbox.new(mock, secret_string)
Expand All @@ -77,7 +77,7 @@ def test_send_mail_with_secret_string

def test_no_secret_string_in_object
secret_string = SecureRandom.hex
mock = MiniTest::Mock.new
mock = Minitest::Mock.new
mock.expect :auth, true, [String]
mb = EvilMailbox.new(mock, secret_string)

Expand All @@ -91,7 +91,7 @@ def test_no_secret_string_in_object
end

def evil_mailbox_with_secret_string(secret_string, &block)
mock = MiniTest::Mock.new
mock = Minitest::Mock.new
mock.instance_eval(&block) if block_given?
[EvilMailbox.new(mock, secret_string), mock]
end
Expand Down
2 changes: 1 addition & 1 deletion 04_block/test/test_simple_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'securerandom'
require '03_simple_bot'

class TestSimpleBot < MiniTest::Test
class TestSimpleBot < Minitest::Test
def bot_for_test(&block)
Class.new(SimpleBot, &block)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def after

require '01_class_definition_first_step'

class TestClassDefinitionFirstStep < MiniTest::Test
class TestClassDefinitionFirstStep < Minitest::Test
def test_judgement
e1 = Judgement.instance_variable_get(:@e1)
e2 = Judgement.instance_variable_get(:@e2)
Expand Down
2 changes: 1 addition & 1 deletion 05_class_definition/test/test_simple_mock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require '02_simple_mock'
require 'securerandom'

class TestSimpleMock < MiniTest::Test
class TestSimpleMock < Minitest::Test
class ClassForMockTest
def hoge; "hoge"; end
end
Expand Down
2 changes: 1 addition & 1 deletion 06_codes_generate_codes/test/test_simple_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require '01_simple_model'
require 'securerandom'

class TestSimpleModel < MiniTest::Test
class TestSimpleModel < Minitest::Test
class Product
include SimpleModel

Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ GEM
remote: https://rubygems.org/
specs:
ansi (1.5.0)
builder (3.2.4)
minitest (5.16.3)
minitest-reporters (1.5.0)
builder (3.3.0)
minitest (5.25.5)
minitest-reporters (1.7.1)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
rake (13.0.6)
ruby-progressbar (1.11.0)
rake (13.2.1)
ruby-progressbar (1.13.0)

PLATFORMS
ruby
Expand Down