diff --git a/spec/controllers/repositories_controller_spec.rb b/spec/controllers/repositories_controller_spec.rb index a48f08c..c7e2506 100644 --- a/spec/controllers/repositories_controller_spec.rb +++ b/spec/controllers/repositories_controller_spec.rb @@ -173,9 +173,9 @@ end describe 'process' do - context 'with a successful processing' do - let!(:processing) { FactoryGirl.build(:processing) } + let(:processing) { FactoryGirl.build(:processing) } + context 'with a successful processing' do before :each do Processing.expects(:create).with(repository: repository, state: "PREPARING").returns(processing) Repository.expects(:find).with(repository.id).returns(repository) @@ -189,6 +189,7 @@ context 'with an unsuccessful processing' do before :each do + Processing.expects(:create).with(repository: repository, state: "PREPARING").returns(processing) Repository.expects(:find).with(repository.id).returns(repository) repository.expects(:process).raises(Errors::ProcessingError)