spec/controllers/koudoku/subscriptions_controller.rb in koudoku-1.0.0 vs spec/controllers/koudoku/subscriptions_controller.rb in koudoku-1.1.0
- old
+ new
@@ -2,18 +2,18 @@
describe Koudoku::SubscriptionsController do
describe 'when customer is signed in' do
before do
@customer = Customer.create(email: 'andrew.culver@gmail.com')
- ApplicationController.any_instance.stub(:current_customer).and_return(@customer)
+ allow_any_instance_of(ApplicationController).to receive(:current_customer).and_return(@customer)
end
it 'works' do
get :index, use_route: 'koudoku'
end
end
describe 'when customer is not signed in' do
before do
- ApplicationController.any_instance.stub(:current_customer).and_return(nil)
+ allow_any_instance_of(ApplicationController).to receive(:current_customer).and_return(nil)
end
it 'works' do
get :index, use_route: 'koudoku'
end
end