Add dspec task to test distributable script

This commit is contained in:
josh committed 2023-09-24 18:54:19 -04:00
1 parent 547dbd3850
commit db6dc0e099
3 files changed
+19 -1

No files matched your search

+6 -1
View File
@@ -11,7 +11,12 @@ describe Propane do
def build_parser(options = {})
options[:name] ||= ""
command = %W[./propane.sh spec/run/testparser#{options[:name]}.propane spec/run/testparser#{options[:name]}.#{options[:language]} --log spec/run/testparser#{options[:name]}.log]
if ENV["dist_specs"]
propane = "dspec/propane"
else
propane = "./propane.sh"
end
command = %W[#{propane} spec/run/testparser#{options[:name]}.propane spec/run/testparser#{options[:name]}.#{options[:language]} --log spec/run/testparser#{options[:name]}.log]
if (options[:capture])
stdout, stderr, status = Open3.capture3(*command)
Results.new(stdout, stderr, status)