Skip to content

Commit

Permalink
Fix CI failures in Ruby 2.x (#17)
Browse files Browse the repository at this point in the history
It appears that Ruby 3.x already sorts files from Dir.glob whereas Ruby 2.x does not sort.
  • Loading branch information
westonganger authored Dec 28, 2023
1 parent 2677fbb commit 3bab9ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/unit/models/translation_key_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module RailsI18nManager

dirname = TranslationKey.export_to(app_name: translation_app.name, zip: false, format: "yaml")
expect(File.directory?(dirname)).to eq(true)
files = Dir.glob("#{dirname}/*")
files = Dir.glob("#{dirname}/*").sort
expect(files.size).to eq(2)
expect(files[0].end_with?("/en.yml")).to eq(true)
expect(files[1].end_with?("/fr.yml")).to eq(true)
Expand All @@ -100,7 +100,7 @@ module RailsI18nManager
it "doesnt zip the content if zip: false" do
dirname = TranslationKey.export_to(app_name: translation_app.name, zip: false, format: "yaml")
expect(File.directory?(dirname)).to eq(true)
files = Dir.glob("#{dirname}/**/*")
files = Dir.glob("#{dirname}/**/*").sort
expect(files.size).to eq(2)
expect(files[0].end_with?("/en.yml")).to eq(true)
expect(files[1].end_with?("/fr.yml")).to eq(true)
Expand Down

0 comments on commit 3bab9ae

Please sign in to comment.