How to test templates

7 views
Skip to first unread message

Ingo Weiss

unread,
Apr 29, 2016, 4:37:06 PM4/29/16
to Lita
Hi all,

I would like to start using templates for different adapters (HipChat, Slack etc.), but how do I test them in Rspec? Is there a way to specify which adapter to use when using 'send_message'?

Thanks!
Ingo

Jimmy Cuadra

unread,
May 3, 2016, 6:52:19 AM5/3/16
to Ingo Weiss, Lita
Hi Ingo,

There isn't a good mechanism for testing that right now, since the template resolving logic just branches based on the current robot's adapter, and the adapter during testing is always the test adapter. This should be improved, though, so I encourage you to file an issue on GitHub! If you have an idea what you'd like the test code to look like, that'd be very helpful.

Jimmy
> --
> You received this message because you are subscribed to the Google Groups "Lita" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to litaio+un...@googlegroups.com.
> To post to this group, send email to lit...@googlegroups.com.
> Visit this group at https://groups.google.com/group/litaio.
> To view this discussion on the web visit https://groups.google.com/d/msgid/litaio/1982f650-093d-4e5d-9277-fc0a5459fe6f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages