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

Fix warnings in spec output #464

Merged
merged 2 commits into from
Aug 8, 2019

Commits on Aug 7, 2019

  1. Avoid warnings for calls to ordered on RSpec stubs

    It's only possible to constrain the order in which calls are made when
    using `expect`; not when using `allow`. Indeed you need at least two
    calls to `expect` with the `ordered` qualifier to make this work.
    
    The following warning was appearing in the spec output multiple times:
    
        WARNING: `allow(...).to receive(..).ordered` is not supported and will have no effect, use `and_return(*ordered_values)` instead..
    
    Thus the calls to `ordered` were not having any effect and so I have
    removed them.
    
    See the documentation [1] for more info.
    
    [1]: https://relishapp.com/rspec/rspec-mocks/v/3-8/docs/setting-constraints/message-order
    floehopper committed Aug 7, 2019
    Configuration menu
    Copy the full SHA
    6e1b143 View commit details
    Browse the repository at this point in the history
  2. Avoid warnings due to multiple calls to configure

    I was seeing multiple warnings like the following in the spec output:
    
        W, [2019-08-07T11:42:43.494699 #48484]  WARN -- : Adapter already configured!
    
    This was because in the Adapter::Darwin spec in the "running threads"
    describe block, both `subject.configure` and `subject.start` were being
    called and the latter calls the former.
    
    By moving the call to `subject.configure` into the "configuration"
    describe block, we can avoid this problem.
    floehopper committed Aug 7, 2019
    Configuration menu
    Copy the full SHA
    086b785 View commit details
    Browse the repository at this point in the history