Skip to content

Commit

Permalink
Make rake mspec_node runnable on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
vais committed Mar 5, 2015
1 parent 6bb64f7 commit f4583c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/opal/path_reader.rb
Expand Up @@ -9,7 +9,7 @@ def initialize(file_finder = HikePathFinder.new)
def read(path)
full_path = expand(path)
return nil if full_path.nil?
File.read(full_path)
File.open(full_path, 'rb:UTF-8'){|f| f.read}
end

def expand(path)
Expand Down
7 changes: 3 additions & 4 deletions tasks/testing.rake
Expand Up @@ -50,14 +50,13 @@ task :mspec_node do
mkdir_p File.dirname(filename)
File.write filename, <<-RUBY
require 'spec_helper'
#{requires.join(" \n")}
#{requires.join("\n ")}
OSpecRunner.main.did_finish
RUBY

stubs = " -smspec/helpers/tmp -smspec/helpers/environment -smspec/guards/block_device -smspec/guards/endian"
stubs = '-smspec/helpers/tmp -smspec/helpers/environment -smspec/guards/block_device -smspec/guards/endian'

sh 'RUBYOPT="-rbundler/setup -rmspec/opal/special_calls" '\
"bin/opal -Ispec -Ilib -gmspec #{stubs} -rnodejs -Dwarning -A #{filename}"
sh "ruby -rbundler/setup -rmspec/opal/special_calls bin/opal -Ispec -Ilib -gmspec #{stubs} -rnodejs -Dwarning -A #{filename}"
end

task :cruby_tests do
Expand Down

0 comments on commit f4583c1

Please sign in to comment.