Tussle of the State Machines

There's no shortage of Ruby state machine libraries (assm, state_machine, etc.). However when we needed to implement dynamic state machine we didn't find one. The Problem We needed a polymorphic class that could have different state machines triggered in it depending on some condition. Basically, here is what we wanted to achieve: Now the problem … Continue reading Tussle of the State Machines

PDF to Plain Text processing using docsplit

As Rubyists, don't we just love searching for gems to do our work for us 🙂 But, that does not always work, does it? There are times when we don't find solution and need to fix it ourselves. Do we remember to contribute back to the community? Here's a similar story and some information about … Continue reading PDF to Plain Text processing using docsplit

What makes rspec3 so interesting?

Here is a list of things that rspec3 has in store for us.

rails learning

Being an rspec fan I have been waiting for quite some time for the rspec3 final release. rspec3 has finally been released and it’s ready for production use. There are many interesting changes that has been incorporated in rspec3. Thanks to myron, Andy and david and other contributors. Here are the few changes that makes testing more fun: Changes in rspec-expectations:Compound Expectations: Composing a expectation using two or more expectations is called compound expectation. Here is the example:

Note: Not only combined pre-defined matchers you can also combined custom matchers also. Below is the example:

Composing Expectation: Composing a expectation with pre-defined expectations or custom expectations so that you can express exactly what you want. Below is the example:

Changes in rspec-mocks: The following changes would be interesting if you use mocks in your test suite. Stub chain of methods: Once in a while you might face an…

View original post 453 more words