spec/cli/help_spec.rb in yard-0.8.7.6 vs spec/cli/help_spec.rb in yard-0.9.0
- old
+ new
@@ -1,22 +1,22 @@
require File.dirname(__FILE__) + '/../spec_helper'
describe YARD::CLI::Help do
- describe '#run' do
- it "should accept 'help command'" do
- CLI::Yardoc.should_receive(:run).with('--help')
+ describe "#run" do
+ it "accepts help command" do
+ expect(CLI::Yardoc).to receive(:run).with('--help')
CLI::Help.run('doc')
end
- it "should accept no arguments (lists all commands)" do
- CLI::CommandParser.should_receive(:run).with('--help')
+ it "accepts no arguments (and lists all commands)" do
+ expect(CLI::CommandParser).to receive(:run).with('--help')
CLI::Help.run
end
- it "should show all commands if command isn't found" do
- CLI::CommandParser.should_receive(:run).with('--help')
+ it "shows all commands if command isn't found" do
+ expect(CLI::CommandParser).to receive(:run).with('--help')
help = CLI::Help.new
- log.should_receive(:puts).with(/not found/)
+ expect(log).to receive(:puts).with(/not found/)
help.run('unknown')
end
end
end
\ No newline at end of file