protoncr / tourmaline

Simple Telegram bot library for Crystal
https://tourmaline.dev
MIT License
158 stars 38 forks source link

Missing example of test spec #35

Open razorinc opened 3 years ago

razorinc commented 3 years ago

I am looking for an example of effective spec testing of the bots with Tourmaline.

I am willing to contribute and add to all the example bots, but I would like to have some guidance/advice before starting this endeavor.

Cheers

watzon commented 3 years ago

The main reason for a lack of tests is that testing API adapters like this is a pain. There are libraries such as webmock (for stubbing requests) and vcr (for capturing and replaying real world data), but I just haven't put in the time to set them up yet. I have been meaning to though, so I'll leave this issue here as a reminder of my failure until I get my butt into gear.