Skip to content

Commit

Permalink
update extractor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoch-cars committed Sep 20, 2021
1 parent 0751c11 commit 5501458
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/ex_factor/extractor_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule ExFactor.ExtractorTest do
describe "emplace/1" do
test "requires some options" do
opts = [
source_module: ExFactorSampleModule,
source_module: "ExFactorSampleModule",
source_function: :pub1,
arity: 1
]
Expand Down Expand Up @@ -45,8 +45,8 @@ defmodule ExFactor.ExtractorTest do

opts = [
target_path: target_path,
target_module: ExFactor.NewMod,
source_module: ExFactorSampleModule,
target_module: "ExFactor.NewMod",
source_module: "ExFactorSampleModule",
source_path: "test/tmp/source_module.ex",
source_function: :pub1,
arity: 1
Expand Down Expand Up @@ -88,8 +88,8 @@ defmodule ExFactor.ExtractorTest do

opts = [
target_path: target_path,
target_module: ExFactor.NewMod,
source_module: ExFactorSampleModule,
target_module: "ExFactor.NewMod",
source_module: "ExFactorSampleModule",
source_path: "test/tmp/source_module.ex",
source_function: :pub1,
arity: 1,
Expand All @@ -100,7 +100,7 @@ defmodule ExFactor.ExtractorTest do
assert {:error, :enoent} = File.read(target_path)
assert output.file_contents
assert output.message == "--dry_run changes to make"
assert output.module == ExFactorSampleModule
assert output.module == "ExFactor.NewMod"
end

test "write a new file with the function, infer some defaults" do
Expand All @@ -119,8 +119,8 @@ defmodule ExFactor.ExtractorTest do
File.write("lib/ex_factor/tmp/source_module.ex", content)

opts = [
target_module: ExFactor.Tmp.TargetModule,
source_module: ExFactor.Tmp.SourceModule,
target_module: "ExFactor.Tmp.TargetModule",
source_module: "ExFactor.Tmp.SourceModule",
source_function: :pub1,
arity: 1
]
Expand Down Expand Up @@ -163,8 +163,8 @@ defmodule ExFactor.ExtractorTest do
File.write("lib/ex_factor/tmp/target_module.ex", content)

opts = [
target_module: ExFactor.Tmp.TargetModule,
source_module: ExFactor.Tmp.SourceModule,
target_module: "ExFactor.Tmp.TargetModule",
source_module: "ExFactor.Tmp.SourceModule",
source_function: :refactor1,
arity: 1
]
Expand Down Expand Up @@ -211,8 +211,8 @@ defmodule ExFactor.ExtractorTest do
File.write("lib/ex_factor/tmp/target_module.ex", content)

opts = [
target_module: ExFactor.Tmp.TargetModule,
source_module: ExFactor.Tmp.SourceModule,
target_module: "ExFactor.Tmp.TargetModule",
source_module: "ExFactor.Tmp.SourceModule",
source_function: :refactor1,
arity: 1
]
Expand Down Expand Up @@ -265,8 +265,8 @@ defmodule ExFactor.ExtractorTest do
File.write("lib/ex_factor/tmp/target_module.ex", content)

opts = [
target_module: ExFactor.Tmp.TargetModule,
source_module: ExFactor.Tmp.SourceModule,
target_module: "ExFactor.Tmp.TargetModule",
source_module: "ExFactor.Tmp.SourceModule",
source_function: :refactor1,
arity: 1
]
Expand Down

0 comments on commit 5501458

Please sign in to comment.