spec/ppl/application/router_spec.rb in ppl-4.0.1 vs spec/ppl/application/router_spec.rb in ppl-4.0.2
- old
+ new
@@ -18,38 +18,38 @@
end
describe "#default=" do
it "should accept the name of the default command" do
@router.default = "one"
- @router.default.should eq "one"
+ expect(@router.default).to eq "one"
end
end
describe "#route" do
it "should return the command whose name matches the given argument" do
- @router.route("two").should be @cmd_two
+ expect(@router.route("two")).to be @cmd_two
end
it "should return nil if no matching command can be found" do
- @router.route("three").should be nil
+ expect(@router.route("three")).to be nil
end
it "should fall back to the default command if the given one isn't found" do
@router.default = "one"
- @router.route("three").should be @cmd_one
+ expect(@router.route("three")).to be @cmd_one
end
it "should apply the aliases if the argument doesn't match a command" do
@router.aliases = {"t" => "two"}
- @router.route("t").should be @cmd_two
+ expect(@router.route("t")).to be @cmd_two
end
it "should return a Ppl::Command::External if the input matches a bang alias" do
- @external.should_receive(:name=).with("t")
- @external.should_receive(:command=).with("two")
+ expect(@external).to receive(:name=).with("t")
+ expect(@external).to receive(:command=).with("two")
@router.aliases = {"t" => "!two"}
- @router.route("t").should be @external
+ expect(@router.route("t")).to be @external
end
end
end