Let's say we were creating an API that allows us to create 'foo's. Foos, as far as we know, will have a first name and a title. We can write a request spec to help us drive out our endpoint's behavior
We recently started using Elasticsearch::Ruby on our project and wanted to add some rspec integration tests. The documentation skips over rspec integration but by adapting their sample tests:
group :test do
# Add… Read more
Summary: If you are using the rspec_api_documentation gem to test and document your API, you can use this code to test that you have a spec for each of your routes. Check out the gist here: http://gist.github.com/kayline/8868438
If you’re building … Read more
Solution – GitHub Gist
Validating that a web app’s content is rendered correctly is an integral part of testing web apps. Displaying user-submitted input in HTML is the core functionality of almost any website. For example, the last couple of … Read more
Imagine if someone flipped a switch on your project that broke your entire integration test suite with failures that surfaced critical, long standing bugs in production that render your site useless to many thousands of users.
Hundreds of failures in … Read more
Over the next few blog posts I intend to bang a few more nails in the coffin of the widespread misunderstanding of stubs, mocks and spies. Many before me have had a crack at this (see Ben Moss’s post for … Read more
If you find that you are making your rspec feature specs longer and longer to cram more coverage in or to prevent the setup costs for more, shorter tests, you will probably have found that it becomes very hard to … Read more
Test Driven Development can be a hard sell. The first pitch is often designed to entice the buyer with safety features, like:“How will you ensure that those bugs don’t creep back in?” “Wouldn’t it be nice to know that…
Test pollution manifests itself as seemingly false negatives or false positives in a test suite. It occurs when some shared state is unintentionally modified, or unintentionally read and used in a test.
When test pollution builds up, it can mean … Read more