Skip to content

Commit

Permalink
rspec for Ruby 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 11, 2024
1 parent baa317c commit 308d978
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions isodoc-i18n.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "liquid", "~> 5"
spec.add_dependency "metanorma-utils", ">= 1.7.0"
spec.add_dependency "twitter_cldr"
spec.add_dependency "base64"

spec.add_development_dependency "debug"
spec.add_development_dependency "equivalent-xml", "~> 0.6"
Expand Down
1 change: 1 addition & 0 deletions lib/isodoc/i18n.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
require_relative "liquid/liquid"
require "liquid"
require_relative "i18n/version"
require "base64"

module IsoDoc
class I18n
Expand Down
8 changes: 4 additions & 4 deletions spec/isodoc/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
c = IsoDoc::I18n.new("en", "Latn", i18nyaml: "spec/assets/new.yaml")
expect(c.text).to eq "text2"
expect(c.at).to eq "at"
expect(c.hash.to_s).to be_equivalent_to '{"key1"=>"val1", "key2"=>"val2"}'
expect(c.arr.to_s).to eq '["arr1", "arr2"]'
expect(c.hash).to be_equivalent_to({"key1"=>"val1", "key2"=>"val2"})
expect(c.arr).to eq(["arr1", "arr2"])
end

it "loads language hash overrides" do
c = IsoDoc::I18n.new("en", "Latn",
i18nhash: YAML.load_file("spec/assets/new.yaml"))
expect(c.text).to eq "text2"
expect(c.at).to eq "at"
expect(c.hash.to_s).to be_equivalent_to '{"key1"=>"val1", "key2"=>"val2"}'
expect(c.arr.to_s).to eq '["arr1", "arr2"]'
expect(c.hash).to be_equivalent_to({"key1"=>"val1", "key2"=>"val2"})
expect(c.arr).to eq ["arr1", "arr2"]
end

it "does English localisation" do
Expand Down

0 comments on commit 308d978

Please sign in to comment.