3 ms·
> Add this to your specs: Rails.stub(:env).and_return('staging') ? allow(Rails).to receive(:env).and_return 'staging'.inquiry This preserves the Rails.env.s
by sjtgraham 12y ago
> Add this to your specs: Rails.stub(:env).and_return('staging') ?
allow(Rails).to receive(:env).and_return 'staging'.inquiry
This preserves the Rails.env.staging? behaviour. Rails.env is an ActiveSupport::StringInquirer