spec/ppl/format/contact/phone_number_spec.rb in ppl-4.0.1 vs spec/ppl/format/contact/phone_number_spec.rb in ppl-4.0.2

- old
+ new

@@ -1,11 +1,11 @@ describe Ppl::Format::Contact::PhoneNumber do describe "#initialize" do it "should pass the colors through to the table" do colors = {"number" => "blue"} - Ppl::Format::Table.should_receive(:new).with([:star, :phone_numbers, :type], colors) + expect(Ppl::Format::Table).to receive(:new).with([:star, :phone_numbers, :type], colors) format = Ppl::Format::Contact::PhoneNumber.new(colors) end end describe "#process" do @@ -18,30 +18,30 @@ @format.table = @table @contact.phone_numbers << @number end it "should always include the phone number" do - @table.should_receive(:add_row).with({ + expect(@table).to receive(:add_row).with({ :star => " ", :phone_numbers => "01234567890", :type => nil, }) @format.process(@contact) end it "should put the type in parentheses" do @number.type = "work" - @table.should_receive(:add_row).with({ + expect(@table).to receive(:add_row).with({ :star => " ", :phone_numbers => "01234567890", :type => "(work)", }) @format.process(@contact) end it "should mark preferred numbers with a star" do @number.preferred = true - @table.should_receive(:add_row).with({ + expect(@table).to receive(:add_row).with({ :star => "*", :phone_numbers => "01234567890", :type => nil, }) @format.process(@contact)