We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e5a5c97 + dc21920 commit fcb29b3Copy full SHA for fcb29b3
lib/rainforest/cli/options.rb
@@ -121,7 +121,10 @@ def initialize(args)
121
122
if ['new', 'rm'].include?(@command)
123
@file_name = @args.shift
124
- @file_name = File.expand_path(@file_name) if @file_name
+
125
+ if @file_name && @command == 'rm'
126
+ @file_name = File.expand_path(@file_name) if @file_name
127
+ end
128
end
129
130
@tests = @args.dup
spec/options_spec.rb
@@ -24,6 +24,12 @@
24
its(:crowd) { should == 'some_name' }
25
26
27
+ context 'new' do
28
+ let(:args) { ['new', 'foo.rfml']}
29
+ its(:command) { should == 'new' }
30
+ its(:file_name) { should == 'foo.rfml' }
31
32
33
context 'rm' do
34
let(:args) { ['rm', 'foo.rfml']}
35
its(:command) { should == 'rm' }
0 commit comments