From bc444c1f0d8a6633b40669181d3652c2c5241282 Mon Sep 17 00:00:00 2001 From: Max Cantor Date: Mon, 14 Sep 2015 18:24:25 -0400 Subject: [PATCH] Create spec for #22. --- spec/guard/coffeescript/runner_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/guard/coffeescript/runner_spec.rb b/spec/guard/coffeescript/runner_spec.rb index 4107fbe..45d428c 100644 --- a/spec/guard/coffeescript/runner_spec.rb +++ b/spec/guard/coffeescript/runner_spec.rb @@ -131,6 +131,13 @@ [pattern], output: 'javascripts', shallow: false) end + context 'with no folders in the input path' do + it 'fails silently because there are no patterns and no output paths' do + expect(File).not_to receive(:open) + runner.run(['application.coffee'], [], output: 'javascripts', shallow: false) + end + end + context 'with the :source_map option' do it 'generates the source map to the output and creates nested directories' do expect(FileUtils).to receive(:mkdir_p).with("#{ @project_path }/javascripts/x/y")