Skip to content

Commit

Permalink
return false when calling Runner.run([])
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Apr 15, 2011
1 parent 2640440 commit 3407dd3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/guard/rspec/runner.rb
Expand Up @@ -5,6 +5,7 @@ class << self
attr_reader :rspec_version

def run(paths, options={})
return false if paths.empty?
message = options[:message] || "Running: #{paths.join(' ')}"
UI.info(message, :reset => true)
system(rspec_command(paths, options))
Expand Down
6 changes: 6 additions & 0 deletions spec/guard/rspec/runner_spec.rb
Expand Up @@ -4,6 +4,12 @@

describe ".run" do

context "when passed an empty paths list" do
it "should return false" do
subject.run([]).should be_false
end
end

context "in a folder without Bundler" do
before(:each) do
Dir.stub(:pwd).and_return(@fixture_path.join("empty"))
Expand Down

0 comments on commit 3407dd3

Please sign in to comment.