Skip to content

Commit

Permalink
Moved the examples to the tests folder (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonovk committed Jan 25, 2024
1 parent e8b765e commit a40fec4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ group :development do
gem 'byebug'
gem 'minitest'
gem 'minitest-reporters'
gem 'rake'
gem 'rubocop'
gem 'rubocop-minitest'
end
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GEM
stringio
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
regexp_parser (2.8.2)
rexml (3.2.6)
rubocop (1.57.2)
Expand Down Expand Up @@ -57,6 +58,7 @@ DEPENDENCIES
byebug
minitest
minitest-reporters
rake
rubocop
rubocop-minitest

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/lib/active_yaml/base_model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_relative '../../test_helper'

class SomeUser < ActiveYaml::BaseModel
yaml '.examples/example.yaml'
yaml 'test/examples/example.yaml'

def some_method
start.kek.lol
Expand Down
2 changes: 1 addition & 1 deletion test/lib/active_yaml/class_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class SomeUser
extend ActiveYaml::ClassMethods
yaml '.examples/example.yaml'
yaml 'test/examples/example.yaml'
end

module ActiveYaml
Expand Down
2 changes: 1 addition & 1 deletion test/lib/active_yaml/parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ParserTest < Minitest::Test
def test_parse
expect_hash = { 'start' => { 'kek' => { 'lol' => 'text', 'cheburek' => 'cheburek',
'users' => %w[Kirill Ekaterina] } } }
result = Parser.parse('.examples/example.yaml')
result = Parser.parse('test/examples/example.yaml')

assert_equal result, expect_hash
end
Expand Down
4 changes: 2 additions & 2 deletions test/lib/active_yaml_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# lib/active_yaml/factory_hash.rb
class ActiveYamlTest < Minitest::Test
def setup
@test_data = ActiveYaml.create('.examples/example.yaml')
@test_empty_data = ActiveYaml.create('.examples/empty.yaml')
@test_data = ActiveYaml.create('test/examples/example.yaml')
@test_empty_data = ActiveYaml.create('test/examples/empty.yaml')
end

# rubocop:disable Naming/VariableNumber
Expand Down

0 comments on commit a40fec4

Please sign in to comment.