zaru / webpush

webpush, Encryption Utilities for Web Push protocol
MIT License
393 stars 73 forks source link

RSpec testing? #85

Closed cenotaph closed 5 years ago

cenotaph commented 5 years ago

Hello, thank you for such a fantastic gem that is so easy to use!

I was wondering if there are any known strategies for testing with RSpec - to write request tests that can report if a Webpush notification was in fact sent. Forgive me if this is inherently obvious to others.

collimarco commented 5 years ago

This library has its own test suite: you should not test the behavior of this library inside your application.

rossta commented 5 years ago

I agree with @collimarco. It should be enough to assert that the method(s) in the Webpush library were called with expected arguments.