在我的葡萄/Rails应用程序中,我已经在ApplicationController中实现了维护模式,所以当该模式处于活动状态时,它将从应用程序中的任何位置重定向到maintenance_mode_path如何迫使rspec在一段时间内处于不同的端点。api/v1/new_endpoint,而整个测试是在MaintenanceModeController中进行的?mode is active' do
context 'when current page is not maintenan
我最近根据这个在我的Rails4应用程序上启用了GZIP,我还按照的建议将use Rack::Deflater添加到了我的config.ru文件中。我的Rails应用程序似乎支持压缩内容,但是当我使用RSpec测试它时,测试失败了,因为response.headers['Content-Encoding']为空。这是我的application.rb: class Application < Rails::Application
# Turn on GZIP c