Sha256: ebb0032f3da1aaba59f0fcd9eb8a4b4fda4e6e881157c8e3d4df316b7c04f9ef

Contents?: true

Size: 391 Bytes

Versions: 8

Compression:

Stored size: 391 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe WialonApi::Error do
  let(:error_data) { Hashie::Mash.new('error' => 4) }
  let(:error) { WialonApi::Error.new(error_data) }

  it '#message returns error message by it\'s code' do
    message = "Wialon server #{WialonApi.wialon_host} returned error 4: Invalid input"
    expect { fail error }.to raise_error(error.class, message)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wialon_api-0.0.8 spec/wialon_api/error_spec.rb
wialon_api-0.0.7 spec/wialon_api/error_spec.rb
wialon_api-0.0.6 spec/wialon_api/error_spec.rb
wialon_api-0.0.5 spec/wialon_api/error_spec.rb
wialon_api-0.0.4 spec/wialon_api/error_spec.rb
wialon_api-0.0.3 spec/wialon_api/error_spec.rb
wialon_api-0.0.2 spec/wialon_api/error_spec.rb
wialon_api-0.0.1 spec/wialon_api/error_spec.rb