How to add a rspec test for API test with http basic auth
Let's say if you put api controller under app/controllers/api/v1/xxx_controller.rb
In most case, you should create spec/controllers/api/v1/xxx_controller_spec.rb
here's a sample script for spec test.