save project before mocking .all method

pull/3327/head
Jens Ulferts 9 years ago
parent 3fdfc147e8
commit 3504cf61e6
  1. 1
      spec/models/project_spec.rb

@ -271,6 +271,7 @@ describe Project, type: :model do
describe '#total_projects_size' do
let(:projects) { FactoryGirl.build_list(:project, 3) }
before do
project.save
projects.each(&:save!)
allow(Project).to receive(:all).and_return(projects)

Loading…
Cancel
Save