Skip to content

RSpec: Use expect syntax and also unset JAVACMD to make tests pass #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Spec: also unset JAVACMD
  • Loading branch information
olleolleolle committed Dec 10, 2017
commit ec552948bbf4f2936e00e05cdb551cd26c0608a3
2 changes: 1 addition & 1 deletion spec/launcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end

it "should pass unrecognized arguments to JRuby" do
expect(jruby_launcher_args("-J-Dsome.option -v --help")[-3..-1]).to contain_exactly("org/jruby/Main", "-v", "--help")
expect(jruby_launcher_args("-J-Dsome.option -v --help")[-3..-1]).to eq ["org/jruby/Main", "-v", "--help"]
end

it "should print help message" do
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def with_environment(pairs = {})
config.before(:all) do
JRubyLauncherHelper.check_executable_built
# clear environment for better control
ENV.delete("JAVACMD")
ENV.delete("JAVA_HOME")
ENV.delete("JRUBY_HOME")
ENV.delete("JAVA_OPTS")
Expand Down