fixed rspec to handle ajax