Convert specs to the latest RSpec syntax #704

Merged
merged 4 commits into from Dec 30, 2013

Conversation

Projects
None yet
3 participants
@yujinakayama
Member

yujinakayama commented Dec 30, 2013

No description provided.

yujinakayama added some commits Dec 30, 2013

Convert specs to RSpec 2.14.7 syntax with Transpec
This conversion is done by Transpec 1.6.1 with the following command:
    transpec

* 27 conversions
    from: expect(collection).to have(n).items
      to: expect(collection.size).to eq(n)

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

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

* 2 conversions
    from: Klass.any_instance.should_not_receive(:message)
      to: expect_any_instance_of(Klass).not_to receive(:message)

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

* 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)
@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Dec 30, 2013

Coverage Status

Coverage remained the same when pulling 3a782c4 on yujinakayama:rspec-syntax into 946585f on bbatsov:master.

Coverage Status

Coverage remained the same when pulling 3a782c4 on yujinakayama:rspec-syntax into 946585f on bbatsov:master.

@bbatsov

This comment has been minimized.

Show comment
Hide comment
@bbatsov

bbatsov Dec 30, 2013

Collaborator

👍 Excellent! I've been meaning to run transpec on RuboCop for a while now, but it always slipped my mind.

Collaborator

bbatsov commented Dec 30, 2013

👍 Excellent! I've been meaning to run transpec on RuboCop for a while now, but it always slipped my mind.

bbatsov added a commit that referenced this pull request Dec 30, 2013

Merge pull request #704 from yujinakayama/rspec-syntax
Convert specs to the latest RSpec syntax

@bbatsov bbatsov merged commit 9df0104 into rubocop-hq:master Dec 30, 2013

1 check passed

default The Travis CI build passed
Details

@yujinakayama yujinakayama deleted the yujinakayama:rspec-syntax branch Dec 30, 2013

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