Skip to content

Commit ce05a18

Browse files
committed
Fix tests
1 parent 85f25a4 commit ce05a18

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

spec/node_tests.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
# Node tests
2+
def dockerfile_node_version(dockerfile_path)
3+
File.open(dockerfile_path) do |file|
4+
file.each_line do |line|
5+
if line =~ /^ENV NODE_VERSION=([0-9]+\.[0-9]+\.[0-9]+)/
6+
return $1
7+
end
8+
end
9+
end
10+
raise "NODE_VERSION not found in #{dockerfile_path}"
11+
end
212

313
def test_node(version)
414
describe command('node -v') do

spec/spec_helper.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
module Helpers
2-
def dockerfile_node_version(dockerfile_path)
3-
File.open(dockerfile_path) do |file|
4-
file.each_line do |line|
5-
if line =~ /^ENV NODE_VERSION=([0-9]+\.[0-9]+\.[0-9]+)/
6-
return $1
7-
end
8-
end
9-
end
10-
raise "NODE_VERSION not found in #{dockerfile_path}"
11-
end
122
def create_image(version)
133

144
puts "Building image..."

0 commit comments

Comments
 (0)