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

Advertisements

About Gautam Rege

Rubyist, Entrepreneur and co-founder of Josh-Software - one of the leading Ruby development shops in India.
This entry was posted in General. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s