bump rspec-rails, remove deprecated rspec syntax
This commit is contained in:
parent
e7b1edbef7
commit
088446e86e
15 changed files with 40 additions and 40 deletions
18
Gemfile.lock
18
Gemfile.lock
|
|
@ -384,20 +384,20 @@ GEM
|
|||
rpm_contrib (2.1.11)
|
||||
newrelic_rpm (>= 3.1.1)
|
||||
newrelic_rpm (>= 3.1.1)
|
||||
rspec (2.10.0)
|
||||
rspec-core (~> 2.10.0)
|
||||
rspec-expectations (~> 2.10.0)
|
||||
rspec-mocks (~> 2.10.0)
|
||||
rspec-core (2.10.1)
|
||||
rspec-expectations (2.10.0)
|
||||
rspec (2.11.0)
|
||||
rspec-core (~> 2.11.0)
|
||||
rspec-expectations (~> 2.11.0)
|
||||
rspec-mocks (~> 2.11.0)
|
||||
rspec-core (2.11.1)
|
||||
rspec-expectations (2.11.3)
|
||||
diff-lcs (~> 1.1.3)
|
||||
rspec-instafail (0.2.4)
|
||||
rspec-mocks (2.10.1)
|
||||
rspec-rails (2.10.1)
|
||||
rspec-mocks (2.11.2)
|
||||
rspec-rails (2.11.0)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec (~> 2.10.0)
|
||||
rspec (~> 2.11.0)
|
||||
ruby-debug (0.10.4)
|
||||
columnize (>= 0.1)
|
||||
ruby-debug-base (~> 0.10.4.0)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ describe BlocksController do
|
|||
it "creates a block" do
|
||||
expect {
|
||||
post :create, :block => {:person_id => eve.person.id}
|
||||
}.should change { alice.blocks.count }.by(1)
|
||||
}.to change { alice.blocks.count }.by(1)
|
||||
end
|
||||
|
||||
it "redirects back" do
|
||||
|
|
@ -43,7 +43,7 @@ describe BlocksController do
|
|||
it "removes a block" do
|
||||
expect {
|
||||
delete :destroy, :id => @block.id
|
||||
}.should change { alice.blocks.count }.by(-1)
|
||||
}.to change { alice.blocks.count }.by(-1)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ describe LikesController do
|
|||
like_count = Like.count
|
||||
expect {
|
||||
delete :destroy, :format => :json, id_field => like2.target_id, :id => like2.id
|
||||
}.should raise_error(ActiveRecord::RecordNotFound)
|
||||
}.to raise_error(ActiveRecord::RecordNotFound)
|
||||
|
||||
Like.count.should == like_count
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ describe ResharesController do
|
|||
it 'creates a reshare' do
|
||||
expect{
|
||||
post_request!
|
||||
}.should change(Reshare, :count).by(1)
|
||||
}.to change(Reshare, :count).by(1)
|
||||
end
|
||||
|
||||
it 'after save, calls add to streams' do
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ describe StatusMessagesController do
|
|||
alice.save
|
||||
expect{
|
||||
@controller.remove_getting_started
|
||||
}.should change{
|
||||
}.to change{
|
||||
alice.reload.getting_started
|
||||
}.from(true).to(false)
|
||||
end
|
||||
|
|
@ -234,7 +234,7 @@ describe StatusMessagesController do
|
|||
it 'does nothing for returning users' do
|
||||
expect{
|
||||
@controller.remove_getting_started
|
||||
}.should_not change{
|
||||
}.to_not change{
|
||||
alice.reload.getting_started
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ describe NotificationsHelper do
|
|||
context 'when post is deleted' do
|
||||
it 'works' do
|
||||
@post.destroy
|
||||
expect{ object_link(@notification, notification_people_link(@notification))}.should_not raise_error
|
||||
expect{ object_link(@notification, notification_people_link(@notification))}.to_not raise_error
|
||||
end
|
||||
|
||||
it 'displays that the post was deleted' do
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ describe "attack vectors" do
|
|||
expect_error /Contact required/ do
|
||||
zord.perform!
|
||||
end
|
||||
}.should_not change(Post, :count)
|
||||
}.to_not change(Post, :count)
|
||||
|
||||
user_should_not_see_guid(bob, bad_post_guid)
|
||||
end
|
||||
|
|
@ -128,7 +128,7 @@ describe "attack vectors" do
|
|||
expect_error /Author does not match XML author/ do
|
||||
receive(profile, :from => alice, :by => bob)
|
||||
end
|
||||
}.should_not change(eve.profile, :first_name)
|
||||
}.to_not change(eve.profile, :first_name)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ describe "attack vectors" do
|
|||
|
||||
expect{
|
||||
receive(malicious_message, :from => alice, :by => bob)
|
||||
}.should_not change(original_message, :author_id)
|
||||
}.to_not change(original_message, :author_id)
|
||||
end
|
||||
|
||||
it 'does not save a message over an old message with the same author' do
|
||||
|
|
@ -167,7 +167,7 @@ describe "attack vectors" do
|
|||
|
||||
expect {
|
||||
receive(malicious_message, :from => eve, :by => bob)
|
||||
}.should_not change(original_message, :text)
|
||||
}.to_not change(original_message, :text)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ describe "attack vectors" do
|
|||
|
||||
expect {
|
||||
receive(ret, :from => alice, :by => bob)
|
||||
}.should_not change(StatusMessage, :count)
|
||||
}.to_not change(StatusMessage, :count)
|
||||
end
|
||||
|
||||
it "silently disregards retractions for non-existent posts(that are from someone other than the post's author)" do
|
||||
|
|
@ -196,7 +196,7 @@ describe "attack vectors" do
|
|||
end
|
||||
expect{
|
||||
receive(bogus_retraction, :from => alice, :by => bob)
|
||||
}.should_not raise_error
|
||||
}.to_not raise_error
|
||||
end
|
||||
|
||||
it 'should not receive retractions where the retractor and the salmon author do not match' do
|
||||
|
|
@ -212,7 +212,7 @@ describe "attack vectors" do
|
|||
expect_error /Author does not match XML author/ do
|
||||
receive(retraction, :from => alice, :by => bob)
|
||||
end
|
||||
}.should_not change(bob.visible_shareables(Post), :count)
|
||||
}.to_not change(bob.visible_shareables(Post), :count)
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ describe "attack vectors" do
|
|||
|
||||
expect{
|
||||
receive(retraction, :from => alice, :by => bob)
|
||||
}.should_not change{bob.reload.contacts.count}
|
||||
}.to_not change{bob.reload.contacts.count}
|
||||
end
|
||||
|
||||
it 'it should not allow you to send retractions with xml and salmon handle mismatch' do
|
||||
|
|
@ -242,7 +242,7 @@ describe "attack vectors" do
|
|||
expect_error /Author does not match XML author/ do
|
||||
receive(retraction, :from => alice, :by => bob)
|
||||
end
|
||||
}.should_not change(bob.contacts, :count)
|
||||
}.to_not change(bob.contacts, :count)
|
||||
end
|
||||
|
||||
it 'does not let another user update other persons post' do
|
||||
|
|
@ -256,7 +256,7 @@ describe "attack vectors" do
|
|||
|
||||
expect{
|
||||
receive(new_message, :from => alice, :by => bob)
|
||||
}.should_not change(original_message, :text)
|
||||
}.to_not change(original_message, :text)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe "i18n interpolation fallbacks" do
|
|||
I18n.t('ago').should == "%{time} ago"
|
||||
end
|
||||
it "raises a MissingInterpolationArgument when arguments are wrong" do
|
||||
expect { I18n.t('ago', :not_time => "2 months") }.should raise_exception(I18n::MissingInterpolationArgument)
|
||||
expect { I18n.t('ago', :not_time => "2 months") }.to raise_exception(I18n::MissingInterpolationArgument)
|
||||
end
|
||||
end
|
||||
context "current locale falls back to English" do
|
||||
|
|
@ -55,7 +55,7 @@ describe "i18n interpolation fallbacks" do
|
|||
describe "when the English translation does not work" do
|
||||
it "raises a MissingInterpolationArgument" do
|
||||
I18n.backend.store_translations('en', {"nonexistant_key" => "%{random_key} also required, so this will fail"})
|
||||
expect { I18n.t('nonexistant_key', :hey => "what") }.should raise_exception(I18n::MissingInterpolationArgument)
|
||||
expect { I18n.t('nonexistant_key', :hey => "what") }.to raise_exception(I18n::MissingInterpolationArgument)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ describe Postzord::Dispatcher do
|
|||
it 'raises and gives you a helpful message if the object can not federate' do
|
||||
expect {
|
||||
Postzord::Dispatcher.build(alice, [])
|
||||
}.should raise_error /Diaspora::Federated::Base/
|
||||
}.to raise_error /Diaspora::Federated::Base/
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ describe Salmon::Slap do
|
|||
parsed_salmon.author_id = 'tom@tom.joindiaspora.com'
|
||||
expect {
|
||||
parsed_salmon.author.public_key
|
||||
}.should raise_error "did you remember to async webfinger?"
|
||||
}.to raise_error "did you remember to async webfinger?"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ describe AppConfig do
|
|||
it "prints an error message and exits" do
|
||||
expect {
|
||||
AppConfig.load!
|
||||
}.should raise_error SystemExit
|
||||
}.to raise_error SystemExit
|
||||
|
||||
$stderr.rewind
|
||||
$stderr.string.chomp.should_not be_blank
|
||||
|
|
@ -57,7 +57,7 @@ describe AppConfig do
|
|||
|
||||
expect {
|
||||
AppConfig.load!
|
||||
}.should raise_error SystemExit
|
||||
}.to raise_error SystemExit
|
||||
|
||||
$stderr.rewind
|
||||
$stderr.string.should include("haven't set up")
|
||||
|
|
@ -69,7 +69,7 @@ describe AppConfig do
|
|||
|
||||
expect {
|
||||
AppConfig.load!
|
||||
}.should raise_error SystemExit
|
||||
}.to raise_error SystemExit
|
||||
|
||||
$stderr.rewind
|
||||
$stderr.string.should include("file format has changed")
|
||||
|
|
@ -82,7 +82,7 @@ describe AppConfig do
|
|||
|
||||
expect {
|
||||
AppConfig.load!
|
||||
}.should raise_error SystemExit
|
||||
}.to raise_error SystemExit
|
||||
|
||||
$stderr.rewind
|
||||
$stderr.string.should include("file format has changed")
|
||||
|
|
|
|||
|
|
@ -246,13 +246,13 @@ describe Photo do
|
|||
it 'is deleted with parent status message' do
|
||||
expect {
|
||||
@status_message.destroy
|
||||
}.should change(Photo, :count).by(-1)
|
||||
}.to change(Photo, :count).by(-1)
|
||||
end
|
||||
|
||||
it 'will delete parent status message if message is otherwise empty' do
|
||||
expect {
|
||||
@photo2.destroy
|
||||
}.should change(StatusMessage, :count).by(-1)
|
||||
}.to change(StatusMessage, :count).by(-1)
|
||||
end
|
||||
|
||||
it 'will not delete parent status message if message had other content' do
|
||||
|
|
@ -263,7 +263,7 @@ describe Photo do
|
|||
expect {
|
||||
@photo2.status_message.reload
|
||||
@photo2.destroy
|
||||
}.should_not change(StatusMessage, :count)
|
||||
}.to_not change(StatusMessage, :count)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ describe Reshare do
|
|||
|
||||
expect{
|
||||
reshare.destroy
|
||||
}.should_not raise_error
|
||||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ STR
|
|||
|
||||
expect{
|
||||
@sm.create_mentions
|
||||
}.should_not raise_error
|
||||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
describe '#mentioned_people' do
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ describe User do
|
|||
|
||||
expect{
|
||||
user.reload.encryption_key
|
||||
}.should_not raise_error
|
||||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue