Skip to content

Commit

Permalink
style: Suppress RuboCop offenses
Browse files Browse the repository at this point in the history
- Lint/RedundantStringCoercion
- Minitest/AssertInstanceOf
  • Loading branch information
mishina2228 committed Apr 13, 2023
1 parent 2a60469 commit 772d4d8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/god/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def call_action(action)
$stdout.reopen(w)
r.close
pid = self.spawn(command)
puts pid.to_s # send pid back to forker
puts pid # send pid back to forker
exit!(0)
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class TestBehavior < Minitest::Test
def test_generate_should_return_an_object_corresponding_to_the_given_type
assert_equal Behaviors::FakeBehavior, Behavior.generate(:fake_behavior, nil).class
assert_instance_of Behaviors::FakeBehavior, Behavior.generate(:fake_behavior, nil)
end

def test_generate_should_raise_on_invalid_type
Expand Down
2 changes: 1 addition & 1 deletion test/test_condition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestCondition < Minitest::Test
# generate

def test_generate_should_return_an_object_corresponding_to_the_given_type
assert_equal Conditions::ProcessRunning, Condition.generate(:process_running, nil).class
assert_instance_of Conditions::ProcessRunning, Condition.generate(:process_running, nil)
end

def test_generate_should_raise_on_invalid_type
Expand Down
4 changes: 2 additions & 2 deletions test/test_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def test_push_pop_wait
eq.push(God::TimedEvent.new(0.1))
t = Thread.new do
# This pop will see an event immediately available, so no wait.
assert_equal TimedEvent, eq.pop.class
assert_instance_of TimedEvent, eq.pop

# This pop will happen before the next event is due, so wait.
assert_equal TimedEvent, eq.pop.class
assert_instance_of TimedEvent, eq.pop
end

t.join
Expand Down
2 changes: 1 addition & 1 deletion test/test_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_transition_should_be_always_if_no_block_was_given
@task.transition(:foo, :bar)

assert_equal 5, @task.metrics.size
assert_equal Conditions::Always, @task.metrics[:foo].first.conditions.first.class
assert_instance_of Conditions::Always, @task.metrics[:foo].first.conditions.first
end

# method_missing
Expand Down

0 comments on commit 772d4d8

Please sign in to comment.