require 'spec_helper'

describe 'alerts', :type => :controller do
  stub_authorization!

  controller(Spree::Admin::BaseController) do
    def index
      render :text => 'ok'
    end

    def should_check_alerts?
      true
    end
  end

  before do
    expect(Spree::Alert).to receive(:current).and_return("string")
  end

  # Regression test for #3716
  it "alerts returned wrong data type" do
    get :index, {}
    expect(response.body).to eq('ok')
  end
end
require 'spec_helper'

describe 'alerts', :type => :controller do
  stub_authorization!

  controller(Spree::Admin::BaseController) do
    def index
      render :text => 'ok'
    end

    def should_check_alerts?
      true
    end
  end

  before do
    # Spree::Alert.should_receive(:current).and_return("string")
  end

  # Regression test for #3716
  it "alerts returned wrong data type" do
    get :index, {}
    expect(response.body).to eq('ok')
  end
end
--- 
+++ 
@@ -14,7 +14,7 @@
   end
 
   before do
-    # Spree::Alert.should_receive(:current).and_return("string")
+    expect(Spree::Alert).to receive(:current).and_return("string")
   end
 
   # Regression test for #3716
Stop hitting Spree's servers when running specs

I noticed this while running specs offline.
We were hitting Spree's "alert" endpoint every time we ran this backend spec.
