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

Define respond_to_missing? in base texter #44

Closed

Conversation

papa-whisky
Copy link
Contributor

Attempting to expect a method call to a texter in RSpec results in a failure:

Failure/Error:
       expect(ExampleTexter).to receive(:send_text)
       ExampleTexter does not implement: send_text

This PR defines the respond_to_missing? method to remedy this, as recommended by community style guide.

@papa-whisky
Copy link
Contributor Author

@Lackoftactics or @sakirtemel any chance of a review on this?

@NGMarmaduke
Copy link

This would be great to get merged - RSpec's verify doubles use respond_to? to validate the mocked object actually responds correctly.

# spec_helper.rb
mocks.verify_partial_doubles = true

# will error
allow(ExampleTexter).to receive(:send_text).and_return(message)

@papa-whisky
Copy link
Contributor Author

@NGMarmaduke Unfortunately it appears this gem is no longer maintained, there's been no activity from the maintainers since early this year. It's a pity because I think it's quite a nice pattern! Anyway, you might be better off just making your own fork for the time being.

@Michal-Visuality
Copy link

@papa-whisky @NGMarmaduke You're right, the project was a bit abandoned for few months (and that's our fault) BUT thanks to your comments we're definitely willing to get back on track as we believe the project is really interesting and we should continue maintaining it. Next Tuesday we will have an internal meeting and hopefully, we'll pick it up from there pretty fast. Have a good day everybody!

@Marahin
Copy link
Contributor

Marahin commented Apr 12, 2019

Re-created the PR at #49 as retriggering build on TravisCI still remembers the old configuration.

@Marahin Marahin closed this Apr 12, 2019
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.

4 participants