igniter/test/igniter_test.exs

23 lines
557 B
Elixir
Raw Normal View History

2024-05-28 15:30:41 +12:00
defmodule IgniterTest do
use ExUnit.Case
doctest Igniter
2024-08-21 06:32:02 +12:00
describe "Igniter.copy_template/4" do
test "it evaluates and writes the template" do
%{rewrite: rewrite} =
Igniter.new()
|> Igniter.copy_template("test/templates/template.css.eex", "lib/foobar.css",
class: "hello"
)
config_file = Rewrite.source!(rewrite, "lib/foobar.css")
assert Rewrite.Source.get(config_file, :content) == """
.hello {
background: black
}
"""
end
end
2024-05-28 15:30:41 +12:00
end