Skip to content

Commit

Permalink
Add .coffee to the allowed file types in the inspector. (Fixes #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed Nov 6, 2011
1 parent bcca7a6 commit 0730e18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/guard/jasmine/inspector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def jasmine_spec?(path)
# @return [Array<String>] the valid files
#
def jasmine_specs
@jasmine_specs ||= Dir.glob('spec/**/*_spec.{js,js.coffee}')
@jasmine_specs ||= Dir.glob('spec/**/*_spec.{js,coffee,js.coffee}')
end

end
Expand Down
5 changes: 3 additions & 2 deletions spec/guard/jasmine/inspector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe Guard::Jasmine::Inspector do
before do
Dir.stub(:glob).and_return ['spec/javascripts/a.js.coffee', 'spec/javascripts/b.js']
Dir.stub(:glob).and_return ['spec/javascripts/a.js.coffee', 'spec/javascripts/b.js', 'c.coffee']
end

subject { Guard::Jasmine::Inspector }
Expand All @@ -24,7 +24,8 @@
subject.clean(['spec/javascripts/a.js.coffee',
'spec/javascripts/b.js',
'app/assets/javascripts/a.js.coffee',
'b.txt']).should == ['spec/javascripts/a.js.coffee', 'spec/javascripts/b.js']
'b.txt',
'c.coffee']).should == ['spec/javascripts/a.js.coffee', 'spec/javascripts/b.js', 'c.coffee']
end

end
Expand Down

0 comments on commit 0730e18

Please sign in to comment.