Skip to content

Commit 81a2bac

Browse files
committed
Spec all feature
1 parent d724bd9 commit 81a2bac

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

spec/ruby/command_line/feature_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@
4646
end
4747
end
4848

49+
it "can be used with all" do
50+
e = "p [defined?(Gem), defined?(DidYouMean), $VERBOSE, 'foo'.frozen?]"
51+
env = {'RUBYOPT' => '-w'}
52+
ruby_exe(e, options: "--enable=all", env: env).chomp.should == "[\"constant\", \"constant\", true, true]"
53+
ruby_exe(e, options: "--enable-all", env: env).chomp.should == "[\"constant\", \"constant\", true, true]"
54+
ruby_exe(e, options: "--disable=all", env: env).chomp.should == "[nil, nil, false, false]"
55+
ruby_exe(e, options: "--disable-all", env: env).chomp.should == "[nil, nil, false, false]"
56+
end
57+
4958
it "prints a warning for unknown features" do
5059
ruby_exe("p 14", options: "--enable=ruby-spec-feature-does-not-exist 2>&1").chomp.should include('warning: unknown argument for --enable')
5160
ruby_exe("p 14", options: "--disable=ruby-spec-feature-does-not-exist 2>&1").chomp.should include('warning: unknown argument for --disable')

spec/tags/command_line/feature_tags.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ slow:The --enable and --disable flags can be used with did_you_mean
55
slow:The --enable and --disable flags can be used with rubyopt
66
slow:The --enable and --disable flags can be used with frozen-string-literal
77
slow:The --enable and --disable flags prints a warning for unknown features
8+
slow:The --enable and --disable flags can be used with all

0 commit comments

Comments
 (0)