|
5 | 5 | it "can be used with gems" do
|
6 | 6 | ruby_exe("p defined?(Gem)", options: "--enable=gems").chomp.should == "\"constant\""
|
7 | 7 | ruby_exe("p defined?(Gem)", options: "--disable=gems").chomp.should == "nil"
|
| 8 | + ruby_exe("p defined?(Gem)", options: "--enable-gems").chomp.should == "\"constant\"" |
| 9 | + ruby_exe("p defined?(Gem)", options: "--disable-gems").chomp.should == "nil" |
8 | 10 | end
|
9 | 11 |
|
10 | 12 | it "can be used with gem" do
|
11 | 13 | ruby_exe("p defined?(Gem)", options: "--enable=gem").chomp.should == "\"constant\""
|
12 | 14 | ruby_exe("p defined?(Gem)", options: "--disable=gem").chomp.should == "nil"
|
| 15 | + ruby_exe("p defined?(Gem)", options: "--enable-gem").chomp.should == "\"constant\"" |
| 16 | + ruby_exe("p defined?(Gem)", options: "--disable-gem").chomp.should == "nil" |
13 | 17 | end
|
14 | 18 |
|
15 | 19 | it "can be used with did_you_mean" do
|
16 | 20 | ruby_exe("p defined?(DidYouMean)", options: "--enable=did_you_mean").chomp.should == "\"constant\""
|
17 | 21 | ruby_exe("p defined?(DidYouMean)", options: "--disable=did_you_mean").chomp.should == "nil"
|
| 22 | + ruby_exe("p defined?(DidYouMean)", options: "--enable-did_you_mean").chomp.should == "\"constant\"" |
| 23 | + ruby_exe("p defined?(DidYouMean)", options: "--disable-did_you_mean").chomp.should == "nil" |
18 | 24 | end
|
19 | 25 |
|
20 | 26 | it "can be used with rubyopt" do
|
21 | 27 | ruby_exe("p $VERBOSE", options: "--enable=rubyopt", env: {'RUBYOPT' => '-w'}).chomp.should == "true"
|
22 | 28 | ruby_exe("p $VERBOSE", options: "--disable=rubyopt", env: {'RUBYOPT' => '-w'}).chomp.should == "false"
|
| 29 | + ruby_exe("p $VERBOSE", options: "--enable-rubyopt", env: {'RUBYOPT' => '-w'}).chomp.should == "true" |
| 30 | + ruby_exe("p $VERBOSE", options: "--disable-rubyopt", env: {'RUBYOPT' => '-w'}).chomp.should == "false" |
23 | 31 | end
|
24 | 32 |
|
25 | 33 | it "can be used with frozen-string-literal" do
|
26 | 34 | ruby_exe("p 'foo'.frozen?", options: "--enable=frozen-string-literal").chomp.should == "true"
|
27 | 35 | ruby_exe("p 'foo'.frozen?", options: "--disable=frozen-string-literal").chomp.should == "false"
|
| 36 | + ruby_exe("p 'foo'.frozen?", options: "--enable-frozen-string-literal").chomp.should == "true" |
| 37 | + ruby_exe("p 'foo'.frozen?", options: "--disable-frozen-string-literal").chomp.should == "false" |
28 | 38 | end
|
29 | 39 |
|
30 | 40 | ruby_version_is "2.6" do
|
31 | 41 | it "can be used with jit" do
|
32 | 42 | ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "true"
|
33 | 43 | ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false"
|
| 44 | + ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "true" |
| 45 | + ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable-jit").chomp.should == "false" |
34 | 46 | end
|
35 | 47 | end
|
36 | 48 |
|
37 | 49 | it "prints a warning for unknown features" do
|
38 | 50 | ruby_exe("p 14", options: "--enable=ruby-spec-feature-does-not-exist 2>&1").chomp.should include('warning: unknown argument for --enable')
|
39 | 51 | ruby_exe("p 14", options: "--disable=ruby-spec-feature-does-not-exist 2>&1").chomp.should include('warning: unknown argument for --disable')
|
| 52 | + ruby_exe("p 14", options: "--enable-ruby-spec-feature-does-not-exist 2>&1").chomp.should include('warning: unknown argument for --enable') |
| 53 | + ruby_exe("p 14", options: "--disable-ruby-spec-feature-does-not-exist 2>&1").chomp.should include('warning: unknown argument for --disable') |
40 | 54 | end
|
41 | 55 |
|
42 | 56 | end
|
|
0 commit comments