/IronPython_Main/Languages/Ruby/Tests/Interop/cli/config_spec.rb
# · Ruby · 25 lines · 21 code · 4 blank · 0 comment · 4 complexity · e16b86686ac137152b7864dbbd49c913 MD5 · raw file
- require File.dirname(__FILE__) + '/../spec_helper'
-
- describe "ir.exe without ir.exe.config" do
- before(:all) do
- bin = ENV['DLR_BIN'] || File.join(ENV['DLR_ROOT'], "bin", "debug")
- temp_bin = tmp("bin")
- Dir.foreach(bin) do |file|
- FileUtils.cp(File.join(bin, file), temp_bin) if file =~ /^(IronRuby|ir|Microsoft)/
- end
- FileUtils.rm_f(File.join(temp_bin, "ir.exe.config"))
- @old_ruby_exe, ENV['RUBY_EXE'] = ENV['RUBY_EXE'], File.join(temp_bin, "ir.exe")
- end
-
- after(:all) do
- ENV['RUBY_EXE'] = @old_ruby_exe
- end
-
- it "still runs" do
- ruby_exe("puts 'Hello'").chomp.should == "Hello"
- end
-
- it "can still host IR.exe" do
- ruby_exe(fixture(__FILE__, "hosting.rb")).chomp.should == "2"
- end
- end