mirror of
https://github.com/ash-project/igniter.git
synced 2024-09-19 13:02:51 +12:00
This reverts commit bba8d5238e
.
This commit is contained in:
parent
bba8d5238e
commit
79ae2d653b
2 changed files with 1 additions and 23 deletions
|
@ -272,7 +272,7 @@ defmodule Igniter.Code.Common do
|
|||
|
||||
def replace_code(zipper, code) do
|
||||
# code = use_aliases(code, zipper)
|
||||
Zipper.replace(zipper, code |> Macro.to_string() |> Sourceror.parse_string!())
|
||||
Zipper.replace(zipper, code)
|
||||
end
|
||||
|
||||
def extendable_block?({:__block__, meta, contents}) when is_list(contents) do
|
||||
|
|
|
@ -234,28 +234,6 @@ defmodule Igniter.Project.ConfigTest do
|
|||
"""
|
||||
end
|
||||
|
||||
@tag :regression
|
||||
test "arbitrary data structures can be used as values" do
|
||||
%{rewrite: rewrite} =
|
||||
Igniter.new()
|
||||
|> Igniter.create_new_elixir_file("config/fake.exs", """
|
||||
import Config
|
||||
|
||||
config :level1, :level2, level3: [{"hello", "world"}]
|
||||
""")
|
||||
|> Igniter.Project.Config.configure("fake.exs", :level1, [:level2, :level3], [
|
||||
{"hello1", "world1"}
|
||||
])
|
||||
|
||||
config_file = Rewrite.source!(rewrite, "config/fake.exs")
|
||||
|
||||
assert Source.get(config_file, :content) == """
|
||||
import Config
|
||||
|
||||
config :level1, :level2, level3: [{"hello1", "world1"}]
|
||||
"""
|
||||
end
|
||||
|
||||
test "present values can be updated by updating map keys" do
|
||||
%{rewrite: rewrite} =
|
||||
Igniter.new()
|
||||
|
|
Loading…
Reference in a new issue