spec/ppl/command/show_spec.rb in ppl-4.0.1 vs spec/ppl/command/show_spec.rb in ppl-4.0.2
- old
+ new
@@ -12,11 +12,11 @@
@command.format = @format
end
describe "#name" do
it "should be 'show'" do
- @command.name.should eq "show"
+ expect(@command.name).to eq "show"
end
end
describe "#execute" do
@@ -24,15 +24,15 @@
@input.arguments = []
expect{@command.execute(@input, @output)}.to raise_error(Ppl::Error::IncorrectUsage)
end
it "should show the contact's name" do
- @storage.should_receive(:require_contact).and_return(@contact)
- @format.should_receive(:process).and_return("John Doe")
+ expect(@storage).to receive(:require_contact).and_return(@contact)
+ expect(@format).to receive(:process).and_return("John Doe")
@input.arguments = ["john"]
- @output.should_receive(:line).with("John Doe")
+ expect(@output).to receive(:line).with("John Doe")
@command.execute(@input, @output)
end
end
end