bin/jspec in jspec-2.11.12 vs bin/jspec in jspec-2.11.13
- old
+ new
@@ -10,11 +10,11 @@
require 'server/server'
RHINO = 'java org.mozilla.javascript.tools.shell.Main'
program :name, 'JSpec'
-program :version, '2.11.12'
+program :version, '2.11.13'
program :description, 'JavaScript BDD Testing Framework'
default_command :bind
command :init do |c|
c.syntax = 'jspec init [dest]'
@@ -257,10 +257,10 @@
end
paths.each do |path|
path = File.join dest, path
if path.include? 'dom'
- contents = File.read(path).gsub 'JSPEC_ROOT/', ''
+ contents = File.read(path).gsub 'JSPEC_ROOT/', root == JSPEC_ROOT ? "#{JSPEC_ROOT}/" : ''
else
contents = File.read(path).gsub 'JSPEC_ROOT', root
end
File.open(path, 'w') { |file| file.write contents }
end