Convert specs to RSpec 2.14.4 syntax #639

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

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

  • 284 conversions
    from: obj.should
    to: expect(obj).to
  • 40 conversions
    from: obj.should_not
    to: expect(obj).not_to
  • 15 conversions
    from: =~ /pattern/
    to: match(/pattern/)
  • 11 conversions
    from: lambda { }.should
    to: expect { }.to
  • 9 conversions
    from: lambda { }.should_not
    to: expect { }.not_to
  • 9 conversions
    from: obj.stub(:message)
    to: allow(obj).to receive(:message)
  • 8 conversions
    from: == expected
    to: eq(expected)
  • 3 conversions
    from: === expected
    to: be === expected
  • 3 conversions
    from: obj.should_not_receive(:message)
    to: expect(obj).not_to receive(:message)
  • 3 conversions
    from: obj.should_receive(:message)
    to: expect(obj).to receive(:message)
  • 3 conversions
    from: obj.unstub(:message)
    to: allow(obj).to receive(:message).and_call_original
  • 1 conversion
    from: Klass.any_instance.should_receive(:message)
    to: expect_any_instance_of(Klass).to receive(:message)
  • 1 conversion
    from: Klass.any_instance.stub(:message)
    to: allow_any_instance_of(Klass).to receive(:message)
  • 1 conversion
    from: its(:attr) { }
    to: describe '#attr' do subject { super().attr }; it { } end
Convert specs to RSpec 2.14.4 syntax
This conversion is done by Transpec 1.13.1 with the following command:
    transpec

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

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

* 15 conversions
    from: =~ /pattern/
      to: match(/pattern/)

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

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

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

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

* 3 conversions
    from: === expected
      to: be === expected

* 3 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

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

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

* 1 conversion
    from: Klass.any_instance.should_receive(:message)
      to: expect_any_instance_of(Klass).to receive(:message)

* 1 conversion
    from: Klass.any_instance.stub(:message)
      to: allow_any_instance_of(Klass).to receive(:message)

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

halogenandtoast commented May 16, 2014

I approve of this merge. There's some syntax I'd want to fix before it got merged in (the bad syntax was in the code originally), such as too much white space or no white space in certain areas.

Sounds good...I'll start going through and cleaning it up.

Owner

jferris commented Apr 10, 2015

@loganhasson thanks for submitting this. I'm going to close this for now, since it's been a long time and the branch is fairly out of date. We're still interesting in updating to RSpec 3 if you have time to rebase and finish this.

@jferris jferris closed this Apr 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment