spec/shell/basic_spec.rb in thor-0.17.0 vs spec/shell/basic_spec.rb in thor-0.18.0

- old
+ new

@@ -1,9 +1,8 @@ -# encoding: UTF-8 +# coding: UTF-8 +require 'helper' -require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') - describe Thor::Shell::Basic do def shell @shell ||= Thor::Shell::Basic.new end @@ -91,12 +90,12 @@ end end describe "#say_status" do it "prints a message to the user with status" do - $stdout.should_receive(:puts).with(" create ~/.thor/task.thor") - shell.say_status(:create, "~/.thor/task.thor") + $stdout.should_receive(:puts).with(" create ~/.thor/command.thor") + shell.say_status(:create, "~/.thor/command.thor") end it "always use new line" do $stdout.should_receive(:puts).with(" create ") shell.say_status(:create, "") @@ -105,31 +104,31 @@ it "does not print a message if base is muted" do shell.should_receive(:mute?).and_return(true) $stdout.should_not_receive(:puts) shell.mute do - shell.say_status(:created, "~/.thor/task.thor") + shell.say_status(:created, "~/.thor/command.thor") end end it "does not print a message if base is set to quiet" do base = MyCounter.new [1,2] base.should_receive(:options).and_return(:quiet => true) $stdout.should_not_receive(:puts) shell.base = base - shell.say_status(:created, "~/.thor/task.thor") + shell.say_status(:created, "~/.thor/command.thor") end it "does not print a message if log status is set to false" do $stdout.should_not_receive(:puts) - shell.say_status(:created, "~/.thor/task.thor", false) + shell.say_status(:created, "~/.thor/command.thor", false) end it "uses padding to set messages left margin" do shell.padding = 2 - $stdout.should_receive(:puts).with(" create ~/.thor/task.thor") - shell.say_status(:create, "~/.thor/task.thor") + $stdout.should_receive(:puts).with(" create ~/.thor/command.thor") + shell.say_status(:create, "~/.thor/command.thor") end end describe "#print_in_columns" do before do