Capycorder helps to record user interactions, generates simple Capybara request specs (Rspec) and copies them into the clipboard for usage in specs. Read more over at polarblau.com.
Some will likely feel that this helper and what it does goes against the "tests first" philosophy and may support bad habbits.
Test driven development is great and should definitely be prefered over adding tests after the fact. But we all know, that sometimes testing just doesn't happen at all or that projects come with a few unit tests only.
I'm hoping that in this case, a small tool like Capycorder could lower the barrier and aid in learning the Capybara API as well as to get some specs running a tad faster.
Navigate to and set-up the page you want to test as needed.
it 'should do something…
do … end` block.Done, now you can use the generated specs e.g. in your Rails project.
As mentioned, I've build this tool for myself, so there's no roadmap. A few things I would like to do:
By all means, any help is highly appreciated.
The included build script will copy all files listed in the manifest
(incl. dependencies) to /build
by default or any other DESTINATION
defined. It will also first compile all coffescript files and finally
create a .zip package ready to use.
thor build [DESTINATION]
You can install the ruby dependencies using bundler.
Check the changelog for latest updates.
Since the specs are loading fixtures via AJAX, you should run them off a server to avoid cross-origin issues. I prefer to use serve.
The specs are written using Jasmine -- you can find the docs here.