Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert specs to RSpec 3.3.2 syntax with Transpec #149

Conversation

shhavel
Copy link

@shhavel shhavel commented Oct 28, 2015

This conversion is done by Transpec 3.1.1 with the following command:
transpec -f

  • 350 conversions
    from: obj.should
    to: expect(obj).to
  • 179 conversions
    from: == expected
    to: eq(expected)
  • 22 conversions
    from: it { should ... }
    to: it { is_expected.to ... }
  • 10 conversions
    from: obj.should_receive(:message)
    to: expect(obj).to receive(:message)
  • 6 conversions
    from: obj.should_not
    to: expect(obj).not_to
  • 3 conversions
    from: it { should_not ... }
    to: it { is_expected.not_to ... }
  • 1 conversion
    from: <= expected
    to: be <= expected
  • 1 conversion
    from: =~ [1, 2]
    to: match_array([1, 2])
  • 1 conversion
    from: >= expected
    to: be >= expected
  • 1 conversion
    from: obj.stub(:message)
    to: allow(obj).to receive(:message)

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

This conversion is done by Transpec 3.1.1 with the following command:
    transpec -f

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

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

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

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

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

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

* 1 conversion
    from: <= expected
      to: be <= expected

* 1 conversion
    from: =~ [1, 2]
      to: match_array([1, 2])

* 1 conversion
    from: >= expected
      to: be >= expected

* 1 conversion
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

For more details: https://github.com/yujinakayama/transpec#supported-conversions
@shhavel shhavel closed this Aug 8, 2023
@shhavel shhavel deleted the chore/convert_specs_to_latest_rspec_syntax branch August 8, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant