Hacker News new | ask | show | jobs
by sjtgraham 4431 days ago
I agree. Instance variable assignment is an implementation detail, IMO it's more useful to describe their behaviour with a request spec for example.
1 comments

Yes, exactly. We use request specs to test regular HTTP requests to regular pages or our API. And then we use feature tests with Capybara and PhantomJS to load the app, click through it, and make it loads as it would in a customer's browser. This covers most of our application. And then we use regular unit tests for anything not customer facing, such as background jobs. But these unit tests make up only a small fraction of our test suite.