RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

mfpiccolo — 4 posts

self_systeem records a users interaction with your rails app and then can replay that interaction in an automatically built test to assert a similar response.

With version 0.1.0, you can require a tests start with the app in the state of a pervious test. This allows you to test your app in a modular fashion, going feature by feature. i.e(sign_in_test, create_post, create_comment)

You can also have multiple starting points for example "admin_signup_test" and "user_signup_test". Each could be the starting point for a separate tree of feature tests.

Now lets build some system tests!
1. a realistic respect for or favorable impression of one's system
2. confidence in one's system worth or abilities
3. system-respect

Do you have low self-systeem? I just cut a gem that might be able to help out.

self_systeem records a users interaction in development and automatically creates system tests based on that users interactions.

It is really simple but has the potential to be quite useful. This is all you need to do do:
1. Install and configure the gem.
2. Run SELF_SYTEEM=true rails s`
3. Walk through your app and cover as much as you feel necessary.
4. Run tests and watch them turn green.
I like how VCR jives with Rspec for recording and replaying HTTP requests in your test suite. Specifically how you can pass a :vcr symbol to a describe or it block and it will handle the cassette naming and file structure automatically. However, in most cases I use Minitest.

Cut a gem that gives Minitest with VCR that functionality here:
Rolling your own integration with an external service where the schema can change from moment to moment can be tough.

I was building an app that relied on salesforce data from multiple salesforce accounts. Not only did we know nothing about the data as we pull it in from the external service, salesforce data structure can be changed at any moment by the users! That scares the hell out of us Rails developers who are used to using structured databases.

I came up with a solution that creates pliable active record objects by using JSON data store in Postgresql.

I extracted this out into a gem called pliable