(PUP-3912) Convert specs to RSpec 3.1.7 syntax with Transpec
This conversion is done by Transpec 3.0.5 with the following command:
transpec
- 8169 conversions from: obj.should to: expect(obj).to
- 5570 conversions from: == expected to: eq(expected)
- 499 conversions from: obj.should_not to: expect(obj).not_to
- 235 conversions from: lambda { }.should to: expect { }.to
- 133 conversions from: =~ /pattern/ to: match(/pattern/)
- 96 conversions from: it { should ... } to: it { is_expected.to ... }
- 66 conversions from: lambda { }.should_not to: expect { }.not_to
- 61 conversions from: =~ [1, 2] to: match_array([1, 2])
- 53 conversions from: proc { }.should to: expect { }.to
- 46 conversions from: stub('something') to: double('something')
- 19 conversions from: mock('something') to: double('something')
- 15 conversions from: proc { }.should_not to: expect { }.not_to
- 14 conversions from: failure_message_for_should { } to: failure_message { }
- 12 conversions from: it { should_not ... } to: it { is_expected.not_to ... }
- 11 conversions from: < expected to: be < expected
- 11 conversions from: > expected to: be > expected
- 5 conversions from: failure_message_for_should_not { } to: failure_message_when_negated { }
- 4 conversions from: obj.unstub(:message) to: allow(obj).to receive(:message).and_call_original
- 2 conversions from: >= expected to: be >= expected
- 1 conversion from: <= expected to: be <= expected
- 1 conversion from: === expected to: be === expected
- 1 conversion from: Proc.new { }.should_not to: expect { }.not_to
- 1 conversion from: def helper_method example; end to: def helper_method RSpec.current_example; end
- 1 conversion from: expect(collection).to have_at_least(n).items to: expect(collection.size).to be >= n
For more details: https://github.com/yujinakayama/transpec#supported-conversions