diff --git a/spec/models/reshare_spec.rb b/spec/models/reshare_spec.rb index 20a50682a..0d99a7923 100644 --- a/spec/models/reshare_spec.rb +++ b/spec/models/reshare_spec.rb @@ -132,7 +132,7 @@ describe Reshare do it 'allows you to destroy the reshare if the root post is missing' do reshare = FactoryGirl.build(:reshare) reshare.root = nil - + expect{ reshare.destroy }.to_not raise_error @@ -159,7 +159,7 @@ describe Reshare do wf_prof_mock = mock wf_prof_mock.should_receive(:fetch).and_return(@original_author) Webfinger.should_receive(:new).and_return(wf_prof_mock) - + @response.stub(:body).and_return(@root_object.to_diaspora_xml) Faraday.default_connection.should_receive(:get).with(@original_author.url + short_post_path(@root_object.guid, :format => "xml")).and_return(@response) @@ -170,17 +170,17 @@ describe Reshare do it "doesn't error out if the post is not found" do @response.stub(:status).and_return(404) Faraday.default_connection.should_receive(:get).and_return(@response) - + expect { Reshare.from_xml(@xml) }.to_not raise_error end - + it "raises if there's another error receiving the post" do @response.stub(:status).and_return(500) @response.stub(:success?).and_return(false) Faraday.default_connection.should_receive(:get).and_return(@response) - + expect { Reshare.from_xml(@xml) }.to raise_error RuntimeError diff --git a/spec/models/status_message_spec.rb b/spec/models/status_message_spec.rb index 49db951c2..7ee8b4bc5 100644 --- a/spec/models/status_message_spec.rb +++ b/spec/models/status_message_spec.rb @@ -263,8 +263,8 @@ STR msg_lc.save; msg_uc.save; msg_cp.save tag_array = msg_lc.tags - msg_uc.tags.should =~ tag_array - msg_cp.tags.should =~ tag_array + expect(msg_uc.tags).to match_array(tag_array) + expect(msg_cp.tags).to match_array(tag_array) end end diff --git a/spec/models/user/querying_spec.rb b/spec/models/user/querying_spec.rb index dd0152d90..4a2294c69 100644 --- a/spec/models/user/querying_spec.rb +++ b/spec/models/user/querying_spec.rb @@ -66,7 +66,7 @@ describe User::Querying do it "does not contain duplicate posts" do bobs_other_aspect = bob.aspects.create(:name => "cat people") bob.add_contact_to_aspect(bob.contact_for(alice.person), bobs_other_aspect) - bob.aspects_with_person(alice.person).should =~ [@bobs_aspect, bobs_other_aspect] + expect(bob.aspects_with_person(alice.person)).to match_array [@bobs_aspect, bobs_other_aspect] bobs_post = bob.post(:status_message, :text => "hai to all my people", :to => [@bobs_aspect.id, bobs_other_aspect.id])