Skip to content

Commit

Permalink
Change how spec path is calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Nov 20, 2017
1 parent 063c5f4 commit 94e2c6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/config/config_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ module Cosmos
tf2.puts "SUBDIR"
tf2.close
tf = Tempfile.new('unittest')
tf.puts "<%= render '#{tf2.path.gsub(Dir.tmpdir, '')}' %>"
tf.puts "<%= render '#{tf2.path}' %>"
# Grab the sub directory name plus filename
subdir_path = tf2.path().split('/')[-2..-1].join('/')
tf.puts "<%= render '#{subdir_path}' %>"
tf.close

@cp.parse_file(tf.path) do |keyword, params|
Expand Down

0 comments on commit 94e2c6e

Please sign in to comment.