spec/integrations/document_spec.rb in onfido-0.0.4 vs spec/integrations/document_spec.rb in onfido-0.1.0

- old
+ new

@@ -8,20 +8,21 @@ file.close file.unlink end let(:file) { Tempfile.new(['passport', '.jpg']) } + before { allow(document).to receive(:open).and_return(:file) } let(:params) do { type: 'passport', side: 'back', file: file } - let(:applicant_id) { '1030303-123123-123123' } + end + let(:applicant_id) { '1030303-123123-123123' } - it 'creates a new document' do - response = document.create('foobar', params) - expect(response['id']).not_to be_nil - end + it 'creates a new document' do + response = document.create('foobar', params) + expect(response['id']).not_to be_nil end end end