Rails gem like this?
Closed this issue · 4 comments
I like motion-juxtapose a lot. Is there a Rails (or Ruby) equivalent we could use on Rails web apps?
I haven't seen anything out there like this for Ruby web apps. That said,in theory, it shouldn't be all that hard to extent motion-juxtapose to work with Rails. Some of the infrastructure is already in place:
- capybara-screenshot + a compatible driver should take care of actually capturing the screenshot.
-The notion of capturing a screenshot is already divorced from the comparison/assertion against the accepted one (viz the strategy pattern: https://github.com/terriblelabs/motion-juxtapose/tree/master/lib/juxtapose/strategy). - motion-juxtapose even already runs under MRI, as Frank is run with regular Ruby rather than being compiled into the app binary.
Mostly, I just need to carve out some time and spike this out. :)
That would be fantastic, @thegreatape. If I didn't already have ProMotion and MotionKit stuff stacked up I'd offer to help. :)
I had some free time today, so I hacked out a proof of concept. If you want to try it out early, I'd love some feedback: https://github.com/terriblelabs/motion-juxtapose/tree/poltergeist-screenshots
Sweet, I'll check it out when I can. This week is pretty full already (got behind on a project).