Testing in Multi-Tenanted Rails App
So I’ve been on contract for almost 18 months, and while testing was important it wasn’t a prerequisite to submit code. So for the our multi-tenanted app testing, I set up everything as Cucumber with Selenium and pointed it our QA servers, I eventually expanded it to the staging and even production boxes.
While it was catching errors, it just wasn’t right because it was bypassing our CI and was just automating user testing rather than being automated testing. I came back to it a few times but I didn’t make any real progress on it until today.
So finally today was breakthrough day, you know you just try something again and suddenly you just figure it out and it works… well enough rambling. heres the important bits.
assuming you have a subdomained app:
RSpec.configure do |config|
Capybara.app_host = "http://yourkewlcompany.mykewlrailsapp.com/"
Well, that’s it, really, yeah I know.