Skip to content

Commit

Permalink
chore: bump igniter and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zachallaun committed Nov 12, 2024
1 parent 8a9d536 commit c18037c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
"owl": {:hex, :owl, "0.12.0", "0c4b48f90797a7f5f09ebd67ba7ebdc20761c3ec9c7928dfcafcb6d3c2d25c99", [:mix], [{:ucwidth, "~> 0.2", [hex: :ucwidth, repo: "hexpm", optional: true]}], "hexpm", "241d85ae62824dd72f9b2e4a5ba4e69ebb9960089a3c68ce6c1ddf2073db3c15"},
"patch": {:hex, :patch, "0.14.0", "34820b7790fbb76d3214e35cb6548210bda00ed1a224b36bb3195daa4a71dd68", [:mix], [], "hexpm", "8d0592a40d64791c36fcbc7dbe368d0436ec166b9561b2fa6358cb2bab17cfa6"},
"rewrite": {:hex, :rewrite, "1.0.1", "2a249d703e47c050ad251fa43a3d019d4c08159ead95ec30ef48357ba88af609", [:mix], [{:glob_ex, "~> 0.1", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.0", [hex: :sourceror, repo: "hexpm", optional: false]}, {:text_diff, "~> 0.1", [hex: :text_diff, repo: "hexpm", optional: false]}], "hexpm", "79869f0bdb22840cf233b99e0dc7b6682a35d7e4747bdf2e78d3bc156b2c7c14"},
"rewrite": {:hex, :rewrite, "1.1.0", "69f869fd6460cde30ae90b09895e42d1840cbdb903802650a28a6959c4777971", [:mix], [{:glob_ex, "~> 0.1", [hex: :glob_ex, repo: "hexpm", optional: false]}, {:sourceror, "~> 1.0", [hex: :sourceror, repo: "hexpm", optional: false]}, {:text_diff, "~> 0.1", [hex: :text_diff, repo: "hexpm", optional: false]}], "hexpm", "adcdd3623a055703c8ecfe4dd24f695ff9d9e1ec6b09c023080999808ff4096e"},
"sourceror": {:hex, :sourceror, "1.7.1", "599d78f4cc2be7d55c9c4fd0a8d772fd0478e3a50e726697c20d13d02aa056d4", [:mix], [], "hexpm", "cd6f268fe29fa00afbc535e215158680a0662b357dc784646d7dff28ac65a0fc"},
"spitfire": {:hex, :spitfire, "0.1.3", "7ea0f544005dfbe48e615ed90250c9a271bfe126914012023fd5e4b6b82b7ec7", [:mix], [], "hexpm", "d53b5107bcff526a05c5bb54c95e77b36834550affd5830c9f58760e8c543657"},
"statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"},
Expand Down
27 changes: 7 additions & 20 deletions test/mix/tasks/mneme.install_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ defmodule Mix.Tasks.Mneme.InstallTest do

import Igniter.Test

defp igniter_diff(igniter, opts \\ []) do
sources =
if opts[:only] do
Enum.filter(igniter.rewrite.sources, fn {_, source} ->
source.path in List.wrap(opts[:only])
end)
else
igniter.rewrite.sources
end

Igniter.diff(sources, color?: false)
end

test "mix mneme.install performs all setup when a project hasn't installed Mneme" do
auto_assert """
Update: .formatter.exs
Expand Down Expand Up @@ -51,7 +38,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
2 + |Mneme.start()
""" <- test_project() |> Igniter.compose_task("mneme.install") |> igniter_diff()
""" <- test_project() |> Igniter.compose_task("mneme.install") |> diff()
end

describe "mix.exs" do
Expand Down Expand Up @@ -93,7 +80,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
""" <-
test_project
|> Igniter.compose_task("mneme.install")
|> igniter_diff(only: "mix.exs")
|> diff(only: "mix.exs")
end

test "when :preferred_cli_env already contains mneme tasks" do
Expand Down Expand Up @@ -121,7 +108,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
auto_assert "" <-
test_project
|> Igniter.compose_task("mneme.install")
|> igniter_diff(only: "mix.exs")
|> diff(only: "mix.exs")
end

test "when :preferred_cli_env already contains only mneme.watch" do
Expand Down Expand Up @@ -161,7 +148,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
""" <-
test_project
|> Igniter.compose_task("mneme.install")
|> igniter_diff(only: "mix.exs")
|> diff(only: "mix.exs")
end

test "when :preferred_cli_env is a call to a local function" do
Expand Down Expand Up @@ -205,7 +192,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
""" <-
test_project
|> Igniter.compose_task("mneme.install")
|> igniter_diff(only: "mix.exs")
|> diff(only: "mix.exs")
end
end

Expand All @@ -224,7 +211,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
auto_assert "" <-
test_project
|> Igniter.compose_task("mneme.install")
|> igniter_diff(only: "test/test_helper.exs")
|> diff(only: "test/test_helper.exs")
end

test "when ExUnit.start/1 has options" do
Expand All @@ -246,7 +233,7 @@ defmodule Mix.Tasks.Mneme.InstallTest do
""" <-
test_project
|> Igniter.compose_task("mneme.install")
|> igniter_diff(only: "test/test_helper.exs")
|> diff(only: "test/test_helper.exs")
end
end
end

0 comments on commit c18037c

Please sign in to comment.