Sha256: 6f460a907f5abacc2e24073fa23302f40834a279cd2d6ee7d4ecc7808f6b1b14

Contents?: true

Size: 624 Bytes

Versions: 34

Compression:

Stored size: 624 Bytes

Contents

require 'spec_helper'

describe 'error reporting' do
  it 'prints the class name of the error' do
    S3Website::error_report(SocketError.new('network is down')).should include(
      'SocketError'
    )
  end

  it 'prints the message of the error' do
    S3Website::error_report(SocketError.new('network is down')).should eq(
      'network is down (SocketError)'
    )
  end

  it "only prints the message if the error is an #{S3Website::S3WebsiteError}" do
    S3Website::error_report(S3Website::NoWebsiteDirectoryFound.new()).should eq(
      "I can't find any website. Are you in the right directory?"
    )
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
s3_website-1.8.2 spec/lib/error_spec.rb
s3_website-1.8.1 spec/lib/error_spec.rb
s3_website-1.8.0 spec/lib/error_spec.rb
s3_website_monadic-0.0.15 spec/lib/error_spec.rb
s3_website_monadic-0.0.14 spec/lib/error_spec.rb
s3_website_monadic-0.0.13 spec/lib/error_spec.rb
s3_website_monadic-0.0.12 spec/lib/error_spec.rb
s3_website_monadic-0.0.11 spec/lib/error_spec.rb
s3_website_monadic-0.0.9 spec/lib/error_spec.rb
s3_website_monadic-0.0.8 spec/lib/error_spec.rb
s3_website_monadic-0.0.7 spec/lib/error_spec.rb
s3_website_monadic-0.0.6 spec/lib/error_spec.rb
s3_website_monadic-0.0.5 spec/lib/error_spec.rb
s3_website-1.7.6 spec/lib/error_spec.rb
s3_website_monadic-0.0.4 spec/lib/error_spec.rb
s3_website_monadic-0.0.3 spec/lib/error_spec.rb
s3_website-1.7.5 spec/lib/error_spec.rb
s3_website_monadic-0.0.2 spec/lib/error_spec.rb
s3_website_monadic-0.0.1 spec/lib/error_spec.rb
s3_website-1.7.4 spec/lib/error_spec.rb