Skip to content

Commit

Permalink
Fixes mistakes in shell/basic_spec.rb wording
Browse files Browse the repository at this point in the history
  • Loading branch information
rthbound committed Jun 25, 2013
1 parent f3c1a9a commit 3c42bd2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/shell/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def shell
shell.say_status(:create, "~/.thor/command.thor")
end

it "always use new line" do
it "always uses new line" do
$stdout.should_receive(:puts).with(" create ")
shell.say_status(:create, "")
end
Expand Down Expand Up @@ -137,7 +137,7 @@ def shell
shell.say_status(:created, "~/.thor/command.thor", false)
end

it "uses padding to set messages left margin" do
it "uses padding to set message's left margin" do
shell.padding = 2
$stdout.should_receive(:puts).with(" create ~/.thor/command.thor")
shell.say_status(:create, "~/.thor/command.thor")
Expand Down Expand Up @@ -259,33 +259,33 @@ def #456 Lanç...
shell.file_collision('foo')
end

it "returns true if the user choose default option" do
it "returns true if the user chooses default option" do
$stdout.stub!(:print)
$stdin.should_receive(:gets).and_return('')
expect(shell.file_collision('foo')).to be_true
end

it "returns false if the user choose no" do
it "returns false if the user chooses no" do
$stdout.stub!(:print)
$stdin.should_receive(:gets).and_return('n')
expect(shell.file_collision('foo')).to be_false
end

it "returns true if the user choose yes" do
it "returns true if the user chooses yes" do
$stdout.stub!(:print)
$stdin.should_receive(:gets).and_return('y')
expect(shell.file_collision('foo')).to be_true
end

it "shows help usage if the user choose help" do
it "shows help usage if the user chooses help" do
$stdout.stub!(:print)
$stdin.should_receive(:gets).and_return('h')
$stdin.should_receive(:gets).and_return('n')
help = capture(:stdout) { shell.file_collision('foo') }
expect(help).to match(/h \- help, show this help/)
end

it "quits if the user choose quit" do
it "quits if the user chooses quit" do
$stdout.stub!(:print)
$stdout.should_receive(:puts).with('Aborting...')
$stdin.should_receive(:gets).and_return('q')
Expand All @@ -295,7 +295,7 @@ def #456 Lanç...
}.to raise_error(SystemExit)
end

it "always returns true if the user choose always" do
it "always returns true if the user chooses always" do
$stdout.should_receive(:print).with('Overwrite foo? (enter "h" for help) [Ynaqh] ')
$stdin.should_receive(:gets).and_return('a')

Expand Down

0 comments on commit 3c42bd2

Please sign in to comment.