Skip to content

Commit

Permalink
fix cops
Browse files Browse the repository at this point in the history
  • Loading branch information
leonovk committed Mar 4, 2024
1 parent c37fb72 commit 156e672
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions test/lib/active_yaml/base_model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_call_chain

assert_equal 'Kirill', result_2

assert @user.start.kek.users.is_a?(Array)
assert_kind_of Array, @user.start.kek.users
end
# rubocop:enable Naming/VariableNumber

Expand All @@ -37,7 +37,7 @@ def test_some_method
def test_incomplete_call
result = @user.start.kek

assert result.is_a?(ActiveYaml::YamlHash)
assert_kind_of ActiveYaml::YamlHash, result
end

def test_yaml_data
Expand Down
4 changes: 2 additions & 2 deletions test/lib/active_yaml/class_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def test_call_chain

assert_equal 'Kirill', result_2

assert SomeUser.start.kek.users.is_a?(Array)
assert_kind_of Array, SomeUser.start.kek.users
end
# rubocop:enable Naming/VariableNumber

def test_incomplete_call
result = SomeUser.start.kek

assert result.is_a?(ActiveYaml::YamlHash)
assert_kind_of ActiveYaml::YamlHash, result
end

def test_yaml_data
Expand Down
10 changes: 5 additions & 5 deletions test/lib/active_yaml/yaml_hash_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def setup # rubocop:disable Metrics/MethodLength
def test_hash
assert_equal @yaml_hash.hash, @hash

assert @yaml_hash.hash.is_a?(Hash)
assert_kind_of Hash, @yaml_hash.hash
end

def test_call_chain_hash
result = @yaml_hash.key6.hash

assert_equal result, @hash['key6']

assert result.is_a?(Hash)
assert_kind_of Hash, result
end

def test_call_chain
Expand All @@ -51,7 +51,7 @@ def test_call_chain
def test_not_full_call_chain
result = @yaml_hash.key1.key2

assert result.is_a?(ActiveYaml::YamlHash)
assert_kind_of ActiveYaml::YamlHash, result
end

def test_when_hash_is_value
Expand All @@ -65,15 +65,15 @@ def test_when_hash_is_hash

assert_equal result, @hash['key1']['key8']['hash']

assert result.is_a?(Hash)
assert_kind_of Hash, result
end

def test_when_hash_is_array
result = @yaml_hash.key1.key2.hash

assert_equal result, @hash['key1']['key2']['hash']

assert result.is_a?(Array)
assert_kind_of Array, result
end
end
end
6 changes: 3 additions & 3 deletions test/lib/active_yaml_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ def test_call_chain

assert_equal 'Kirill', result_2

assert @test_data.start.kek.users.is_a?(Array)
assert_kind_of Array, @test_data.start.kek.users
end
# rubocop:enable Naming/VariableNumber

def test_incomplete_call
result = @test_data.start.kek

assert result.is_a?(ActiveYaml::YamlHash)
assert_kind_of ActiveYaml::YamlHash, result
end

def test_empty_file
assert @test_empty_data.is_a?(ActiveYaml::YamlHash)
assert_kind_of ActiveYaml::YamlHash, @test_empty_data
end
end

0 comments on commit 156e672

Please sign in to comment.