Sha256: af69e562e4e4a927fa4049c0e417ad0f3a77e0f30b40898f05bf7b3c33faf180

Contents?: true

Size: 380 Bytes

Versions: 2

Compression:

Stored size: 380 Bytes

Contents

shared_examples_for 'an object with errors' do
  before(:each) do
    stub_request(:any, /#{@base}/).to_return(json_response(false, 'There was an error!'))
  end

  context 'class methods' do
    it 'should raise errors' do
      expect { described_class.first(get_attributes) }.to raise_error
      expect { described_class.all(get_attributes) }.to raise_error
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
survey-gizmo-ruby-4.1.0 spec/support/spec_shared_object_with_errors.rb
survey-gizmo-ruby-4.0.0 spec/support/spec_shared_object_with_errors.rb