Skip to content

Commit

Permalink
improvement: add testing Cldr
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Feb 27, 2025
1 parent 65736de commit 2d0737e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if config_env() == :test do
config :ash, :validate_domain_resource_inclusion?, false
config :ash, :validate_domain_config_inclusion?, false
config :ash, :disable_async?, true
config :ex_money, default_cldr_backend: AshMoney.Cldr
end

config :ash, :known_types, [AshMoney.Types.Money]
Expand Down
7 changes: 7 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ defmodule AshDoubleEntry.MixProject do
consolidate_protocols: Mix.env() != :test,
description: @description,
dialyzer: [plt_add_apps: [:mix]],
elixirc_paths: elixirc_paths(Mix.env()),
aliases: aliases(),
deps: deps(),
package: package(),
Expand All @@ -32,6 +33,12 @@ defmodule AshDoubleEntry.MixProject do
]
end

defp elixirc_paths(:test) do
["lib", "test/support"]
end

defp elixirc_paths(_), do: ["lib"]

defp package do
[
name: :ash_double_entry,
Expand Down
6 changes: 6 additions & 0 deletions test/support/cldr.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
defmodule AshMoney.Cldr do
@moduledoc false
use Cldr,
locales: ["en"],
default_locale: "en"
end

0 comments on commit 2d0737e

Please sign in to comment.