spec/ppl/format/address_book/ages_spec.rb in ppl-4.0.1 vs spec/ppl/format/address_book/ages_spec.rb in ppl-4.0.2
- old
+ new
@@ -1,10 +1,10 @@
describe Ppl::Format::AddressBook::Ages do
describe "#initialize" do
it "should pass the colors through to the table" do
colors = {"id" => "blue"}
- Ppl::Format::Table.should_receive(:new).with([:id, :age], colors)
+ expect(Ppl::Format::Table).to receive(:new).with([:id, :age], colors)
format = Ppl::Format::AddressBook::Ages.new(colors)
end
end
end
@@ -22,19 +22,19 @@
end
describe "#process" do
it "should at least show the contact's id" do
- @table.should_receive(:add_row).with({
+ expect(@table).to receive(:add_row).with({
:id => "test:",
:age => "",
})
@format.process(@address_book)
end
it "should show an age if it's available" do
@contact.birthday = Date.parse("1970-01-01")
- @table.should_receive(:add_row).with({
+ expect(@table).to receive(:add_row).with({
:id => "test:",
:age => "10",
})
@format.process(@address_book)
end