Skip to content

Commit

Permalink
Better info runner message.
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed Jan 13, 2012
1 parent 31838e0 commit f9828ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/guard/rspectacle/runner.rb
Expand Up @@ -27,7 +27,7 @@ class << self
# @return [Array] the spec result: status, failed_examples, passed_examples, pending_examples
#
def run(examples, options, err=$stderr, out=$stdout)
message = options[:message] || "Run specs #{ examples.join(' ') }"
message = options[:message] || "Run #{ examples.join(' ') }"
::Guard::UI.info(message, :reset => true)

rspec_options = options[:cli].to_s.split
Expand Down
6 changes: 3 additions & 3 deletions spec/guard/rspectacle/runner_spec.rb
Expand Up @@ -28,15 +28,15 @@

context 'without a message option' do
it 'shows an info message with all the examples to run' do
::Guard::UI.should_receive(:info).with('Run specs a_spec.rb b_spec.rb', { :reset=>true })
::Guard::UI.should_receive(:info).with('Run a_spec.rb b_spec.rb', { :reset=>true })
runner.run(%w(a_spec.rb b_spec.rb), defaults)
end
end

context 'with a message option' do
it 'shows the given message' do
::Guard::UI.should_receive(:info).with('Running all specs', { :reset=>true })
runner.run(%w(a_spec.rb b_spec.rb), defaults.merge({ :message => 'Running all specs' }))
::Guard::UI.should_receive(:info).with('Run all specs', { :reset=>true })
runner.run(%w(a_spec.rb b_spec.rb), defaults.merge({ :message => 'Run all specs' }))
end
end

Expand Down

0 comments on commit f9828ca

Please sign in to comment.