summaryrefslogtreecommitdiff
path: root/spec/mspec/spec/integration/interpreter_spec.rb
blob: b6fa6859d1f85f101c9926a2fa132e1c0dd2164f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'spec_helper'

describe "The interpreter passed with -t" do
  it "is used in subprocess" do
    fixtures = "spec/fixtures"
    interpreter = "#{fixtures}/my_ruby"
    out, ret = run_mspec("run", "#{fixtures}/print_interpreter_spec.rb -t #{interpreter}")
    out = out.lines.map(&:chomp).reject { |line|
      line == 'RUBY_DESCRIPTION'
    }.take(3)
    out.should == [
      interpreter,
      interpreter,
      "CWD/#{interpreter}"
    ]
    ret.success?.should == true
  end
end