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

Update RSpec expectations syntax using Transpec #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sgerrand
Copy link

💁 The API for RSpec::Expectations has changed in v3.0. These changes update the existing tests to use the :expect syntax.

Sasha Gerrand added 3 commits August 13, 2014 16:37
"DEPRECATION: mock is deprecated. Use double instead."
This conversion is done by Transpec 2.2.0 with the following command:
    transpec

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

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

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

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

* 12 conversions
    from: proc { }.should
      to: expect { }.to

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

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

See also: https://github.com/yujinakayama/transpec#supported-conversions
@sgerrand
Copy link
Author

🙋 These changes branch off #34.

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.

1 participant