Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.55 kb
require File.dirname(__FILE__) + '/../spec_helper'
describe "The -e command line option" do
it "evaluates the given string" do
ruby_exe("puts 'foo'").chomp.should == "foo"
end
it "joins multiple strings with newlines" do
ruby_exe(nil, :args => %Q{-e "puts 'hello" -e "world'"}).chomp.should == "hello\nworld"
end
it "uses 'main' as self" do
ruby_exe("puts self").chomp.should == "main"
end
it "uses '-e' as file" do
ruby_exe("puts __FILE__").chomp.should == "-e"
end
#needs to test return => LocalJumpError
end
Jump to Line
Something went wrong with that request. Please try again.