spec/speckle/cli/environment_spec.rb in speckle-0.1.22 vs spec/speckle/cli/environment_spec.rb in speckle-0.1.23
- old
+ new
@@ -101,11 +101,11 @@
end
end
module Speckle
module CLI
-
+
describe 'Main options basics' do
it 'defaults to compile_and_test without args' do
expect('').to yield_action(:compile_and_test)
end
@@ -127,11 +127,11 @@
end
describe 'Source path defaults' do
- it 'has uses spec directory if present' do
+ it 'uses spec directory without args', :dms => true do
expect('').to include_path('spec')
end
it 'includes spec directory if no files were specified with -a or --all' do
expect('-a').to include_path('spec')
@@ -144,9 +144,20 @@
end
it 'includes spec directory if no files were specified with -t or --test' do
expect('-t').to include_path('spec')
expect('--test').to include_path('spec')
+ end
+
+ it 'does not use spec directory when file is specified', :dms => true do
+ expect('a.riml').to include_path('a.riml')
+ expect('a.riml').to_not include_path('spec')
+ end
+
+ it 'does not use spec directory when multiple file is specified', :dms => true do
+ env = Environment.new
+ opts = env.load(['a.riml', 'b.riml'])
+ expect(opts.inputs).to eq(['a.riml', 'b.riml'])
end
end
describe 'Extra options and flags' do