Skip to content

Commit

Permalink
style: rename version module attribute in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed May 2, 2024
1 parent e7d9d30 commit 8acb2d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/nodelix_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule NodelixTest do
use ExUnit.Case, async: true

@version Nodelix.VersionManager.latest_lts_version()
@latest_lts_version Nodelix.VersionManager.latest_lts_version()

setup_all do
File.rm_rf!(Path.join([Mix.Project.build_path(), "nodejs"]))
Expand All @@ -11,13 +11,13 @@ defmodule NodelixTest do
test "run without profile" do
assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--version"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "run on another profile" do
assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--profile", "test_profile"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "installs and runs multiple versions" do
Expand All @@ -27,13 +27,13 @@ defmodule NodelixTest do

assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--version"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "re-installs with force flag" do
assert ExUnit.CaptureLog.capture_log(fn ->
assert Mix.Task.rerun("nodelix.install", ["--force"]) == :ok
end) =~ "Succesfully installed Node.js v#{@version}"
end) =~ "Succesfully installed Node.js v#{@latest_lts_version}"
end

test "installs with custom URL" do
Expand Down

0 comments on commit 8acb2d1

Please sign in to comment.