spec/controllers/faqs_controller_spec.rb in spree-faq-2.1.0 vs spec/controllers/faqs_controller_spec.rb in spree-faq-2.1.1

- old
+ new

@@ -1,13 +1,11 @@ -require 'spec_helper' +RSpec.describe Spree::FaqsController, type: :controller do -describe Spree::FaqsController do - let!(:question_category) { create(:question_category) } let!(:question) { create(:question, question_category: question_category) } - before { controller.stub spree_current_user: nil } + before { allow(controller).to receive(:try_spree_current_user) } context '#index' do specify do categories = [ question_category, @@ -20,10 +18,10 @@ expect(response).to be_success end end context '#default_title' do - it 'return default title' do + it 'returns default title' do expect(subject.default_title).to eq Spree.t(:frequently_asked_questions, scope: :spree_faq) end end end