Skip to content

Commit 5e6c730

Browse files
committed
Fix tests for Travis CI
1 parent 5f53e47 commit 5e6c730

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

test/rake_tasks_test.rb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ def test_rake_task_webpacker_check_binstubs
2828
refute_includes output, "webpack binstubs not found."
2929
end
3030

31+
def test_check_node_version
32+
output = Dir.chdir(test_app_path) { `rake webpacker:check_node 2>&1` }
33+
refute_includes output, "Webpacker requires Node.js"
34+
end
35+
36+
def test_check_yarn_version
37+
output = Dir.chdir(test_app_path) { `rake webpacker:check_yarn 2>&1` }
38+
refute_includes output, "Yarn not installed"
39+
refute_includes output, "Webpacker requires Yarn"
40+
end
41+
3142
def test_rake_webpacker_yarn_install_in_non_production_environments
3243
assert_includes test_app_dev_dependencies, "right-pad"
3344

@@ -52,16 +63,6 @@ def test_rake_webpacker_yarn_install_in_production_environment
5263
"Expected only production dependencies to be installed"
5364
end
5465

55-
def test_check_node_version
56-
output = Dir.chdir(test_app_path) { `rake webpacker:check_node 2>&1` }
57-
assert_empty output
58-
end
59-
60-
def test_check_yarn_version
61-
output = Dir.chdir(test_app_path) { `rake webpacker:check_yarn 2>&1` }
62-
assert_empty output
63-
end
64-
6566
private
6667
def test_app_path
6768
File.expand_path("test_app", __dir__)

0 commit comments

Comments
 (0)