File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class ClassOptionGroupPlugin < Thor::Group
47
47
:default => "zebra"
48
48
end
49
49
50
- class CompatibleWith19Plugin < ClassOptionGroupPlugin
50
+ class PluginInheritingFromClassOptionsGroup < ClassOptionGroupPlugin
51
51
desc "animal"
52
52
def animal
53
53
p options [ :who ]
@@ -119,7 +119,7 @@ def with_args(*args)
119
119
)
120
120
121
121
BoringVendorProvidedCLI . register (
122
- CompatibleWith19Plugin ,
122
+ PluginInheritingFromClassOptionsGroup ,
123
123
"zoo" ,
124
124
"zoo [-w animal]" ,
125
125
"Shows a provided animal or just zebra"
@@ -221,13 +221,13 @@ def with_args(*args)
221
221
end
222
222
end
223
223
224
- describe "1.8 and 1.9 syntax compatibility " do
225
- it "is compatible with both 1.8 and 1.9 syntax w/o command options" do
224
+ describe ".register-ing a Thor::Group subclass with class options " do
225
+ it "works w/o command options" do
226
226
group_output = capture ( :stdout ) { BoringVendorProvidedCLI . start ( %w( zoo ) ) }
227
227
expect ( group_output ) . to match ( /zebra/ )
228
228
end
229
229
230
- it "is compatible with both 1.8 and 1.9 syntax w/command options" do
230
+ it "works w/command options" do
231
231
group_output = capture ( :stdout ) { BoringVendorProvidedCLI . start ( %w( zoo -w lion ) ) }
232
232
expect ( group_output ) . to match ( /lion/ )
233
233
end
You can’t perform that action at this time.
0 commit comments