Added RSpec tests to test middle-ware configuration.