<commit_before>require 'spec_helper'
describe ItemsController do
 	before(:each) do
 		allow_message_expectations_on_nil
		user = double('user')
		allow(request.env['warden']).to receive(:authenticate!) { user }
		allow(controller).to receive(:current_user) { user }
  end

	describe 'index' do
		it 'should call model method to get all items' do
			Item.should_receive(:all)
			get :index
		end
	end
	describe 'breakfast' do
		it 'should call model method to get all breakfast' do
			Item.should_receive(:where).with(category: 'Breakfast')
			get :breakfast
		end
	end
	describe 'lunch' do
		it 'should call model method to get all lunch' do
			Item.should_receive(:where)
			get :lunch
		end
	end
	describe 'dinner' do
		it 'should call model method to get all dinner' do
			Item.should_receive(:where)
			get :dinner
		end
	end
	
end<commit_msg>rpsec passing<commit_after>require 'spec_helper'
describe ItemsController do
 	before(:each) do
 		allow_message_expectations_on_nil
		user = double('user')
		allow(request.env['warden']).to receive(:authenticate!) { user }
		allow(controller).to receive(:current_user) { user }
  end

	describe 'index' do
		it 'should call model method to get all items' do
			
			get :index
			expect(response).to redirect_to(items_breakfast_path)
		end
	end
	describe 'breakfast' do
		it 'should call model method to get all breakfast' do
			Item.should_receive(:where).with(category: 'Breakfast')
			get :breakfast
		end
	end
	describe 'lunch' do
		it 'should call model method to get all lunch' do
			Item.should_receive(:where)
			get :lunch
		end
	end
	describe 'dinner' do
		it 'should call model method to get all dinner' do
			Item.should_receive(:where)
			get :dinner
		end
	end
	
end
{'fraction_non_alphanumeric': 0.08969907407407407, 'fraction_numerical': 0.0, 'mean_word_length': 4.070381231671554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4879204', 'n_tokens_mistral': 642, 'n_tokens_neox': 555, 'n_words': 183}