Skip to content

Commit

Permalink
Replace File.expand_path with simple __dir__ interpolation (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWayfer authored Jan 11, 2024
1 parent f47aa75 commit 6542b11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,5 @@ task :dump_type_attributes do
end

# Write everything to fixture file
File.write(
File.expand_path('spec/support/type_attributes.yml', __dir__),
result.to_yaml
)
File.write "#{__dir__}/spec/support/type_attributes.yml", result.to_yaml
end
4 changes: 1 addition & 3 deletions spec/lib/telegram/bot/types_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

require 'yaml'

type_attributes = YAML.safe_load(
File.read(File.expand_path('../../../support/type_attributes.yml', __dir__))
)
type_attributes = YAML.safe_load File.read("#{__dir__}/../../../support/type_attributes.yml")

RSpec.describe Telegram::Bot::Types do
type_attributes.each do |parsed_type, parsed_attributes|
Expand Down

0 comments on commit 6542b11

Please sign in to comment.