mirror of
https://github.com/ash-project/igniter.git
synced 2024-09-20 05:22:52 +12:00
22 lines
557 B
Elixir
22 lines
557 B
Elixir
defmodule IgniterTest do
|
|
use ExUnit.Case
|
|
doctest Igniter
|
|
|
|
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
|
|
end
|