PageRenderTime 14ms CodeModel.GetById 1ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1require File.dirname(__FILE__) + '/../spec_helper'
 2
 3describe "ir.exe without ir.exe.config" do
 4  before(:all) do
 5    bin = ENV['DLR_BIN'] || File.join(ENV['DLR_ROOT'], "bin", "debug")
 6    temp_bin = tmp("bin")
 7    Dir.foreach(bin) do |file|
 8      FileUtils.cp(File.join(bin, file), temp_bin) if file =~ /^(IronRuby|ir|Microsoft)/
 9    end
10    FileUtils.rm_f(File.join(temp_bin, "ir.exe.config"))
11    @old_ruby_exe, ENV['RUBY_EXE'] = ENV['RUBY_EXE'], File.join(temp_bin, "ir.exe")
12  end
13
14  after(:all) do
15    ENV['RUBY_EXE'] = @old_ruby_exe
16  end
17
18  it "still runs" do
19    ruby_exe("puts 'Hello'").chomp.should == "Hello"
20  end
21
22  it "can still host IR.exe" do
23    ruby_exe(fixture(__FILE__, "hosting.rb")).chomp.should == "2"
24  end
25end