Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions command_line/dash_r_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@
out.should_not.include?("REQUIRED")
out.should.include?("No such file or directory")
end

it "requires in order when given multiple times" do
ruby_exe("", options: "-r#{fixture(__FILE__, "test_file.rb")} -r#{fixture(__FILE__, "verbose.rb")}").
should == "REQUIRED\nfalse\n"
end
end
6 changes: 6 additions & 0 deletions command_line/rubyopt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
ruby_exe("0", args: '2>&1').should =~ /^rubyopt.rb required/
end

it "requires from CLI -r first and then from RUBYOPT -r" do
ENV["RUBYOPT"] = "-r#{fixture(__FILE__, "rubyopt.rb")}"
ruby_exe("", options: "-r#{fixture(__FILE__, "test_file.rb")}").
should == "REQUIRED\nrubyopt.rb required\n"
end

it "raises a RuntimeError for '-a'" do
ENV["RUBYOPT"] = '-a'
ruby_exe("", args: '2>&1', exit_status: 1).should =~ /RuntimeError/
Expand Down
Loading