projecthydra/sufia — pull request #703 by mjgiarlo (2014-10-31 01:51:45+00:00)
Title: Convert specs to RSpec 3.1.7 syntax with Transpec

This conversion is done by Transpec 2.3.7 with the following command:
transpec

* 626 conversions
from: obj.should
to: expect(obj).to

* 306 conversions
from: == expected
to: eq(expected)

* 53 conversions
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)

* 36 conversions
from: lambda { }.should_not
to: expect { }.not_to

* 31 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)

* 30 conversions
from: obj.should_not
to: expect(obj).not_to

* 26 conversions
from: describe 'some controller' { }
to: describe 'some controller', :type => :controller { }

* 26 conversions
from: it { should ... }
to: it { is_expected.to ... }

* 25 conversions
from: describe 'some model' { }
to: describe 'some model', :type => :model { }

* 21 conversions
from: it { should_not ... }
to: it { is_expected.not_to ... }

* 20 conversions
from: Klass.any_instance.stub(:message)
to: allow_any_instance_of(Klass).to receive(:message)

* 17 conversions
from: describe 'some view' { }
to: describe 'some view', :type => :view { }

* 16 conversions
from: its(:attr) { }
to: describe '#attr' do subject { super().attr }; it { } end

* 14 conversions
from: describe 'some feature' { }
to: describe 'some feature', :type => :feature { }

* 7 conversions
from: describe 'some helper' { }
to: describe 'some helper', :type => :helper { }

* 7 conversions
from: lambda { }.should
to: expect { }.to

* 7 conversions
from: obj.stub(:message => value)
to: allow(obj).to receive_messages(:message => value)

* 6 conversions
from: Klass.any_instance.should_receive(:message)
to: expect_any_instance_of(Klass).to receive(:message)

* 3 conversions
from: describe 'some routing' { }
to: describe 'some routing', :type => :routing { }

* 2 conversions
from: obj.unstub(:message)
to: allow(obj).to receive(:message).and_call_original

* 1 conversion
from: obj.should_not_receive(:message)
to: expect(obj).not_to receive(:message)

* 1 conversion
from: obj.stub_chain(:message1, :message2)
to: allow(obj).to receive_message_chain(:message1, :message2)

For more details: https://github.com/yujinakayama/transpec#supported-conversions