Sha256: 975ae9461bbc30f427441b4fcdf1e2c93440c8896775186a3f459f3af614b50b

Contents?: true

Size: 834 Bytes

Versions: 48

Compression:

Stored size: 834 Bytes

Contents

# encoding:utf-8

require 'spec_helper'

describe WashoutBuilder::Type do
  let(:exception) { WashoutBuilderTestError }
  let(:fault_classes) { [exception] }

  it 'defines a list of types' do
    expect(WashoutBuilder::Type::BASIC_TYPES).to eq(%w(string integer double boolean date datetime float time int))
  end

  it 'gets the fault classes defined' do
    expect(WashoutBuilder::Type.all_fault_classes).to eq([base_exception])
  end

  context 'exception' do
    before(:each) do
      WashoutBuilder::Type.stubs(:all_fault_classes).returns([base_exception])
    end

    it 'checks if exception has ancestor' do
      expect(WashoutBuilder::Type.ancestor_fault?(exception)).to eq(true)
    end

    it 'checks if exception valid' do
      expect(WashoutBuilder::Type.valid_fault_class?(exception)).to eq(true)
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
washout_builder-2.0.5 spec/lib/washout_builder/type_spec.rb
washout_builder-2.0.4 spec/lib/washout_builder/type_spec.rb
washout_builder-2.0.3 spec/lib/washout_builder/type_spec.rb
washout_builder-2.0.2 spec/lib/washout_builder/type_spec.rb
washout_builder-2.0.0 spec/lib/washout_builder/type_spec.rb
washout_builder-1.7.5 spec/lib/washout_builder/type_spec.rb
washout_builder-1.7.4 spec/lib/washout_builder/type_spec.rb
washout_builder-1.7.3 spec/lib/washout_builder/type_spec.rb
washout_builder-1.7.2 spec/lib/washout_builder/type_spec.rb
washout_builder-1.7.1 spec/lib/washout_builder/type_spec.rb
washout_builder-1.7.0 spec/lib/washout_builder/type_spec.rb
washout_builder-1.6.5 spec/lib/washout_builder/type_spec.rb
washout_builder-1.6.4 spec/lib/washout_builder/type_spec.rb
washout_builder-1.6.3 spec/lib/washout_builder/type_spec.rb
washout_builder-1.6.2 spec/lib/washout_builder/type_spec.rb
washout_builder-1.6.1 spec/lib/washout_builder/type_spec.rb
washout_builder-1.5.6 spec/lib/washout_builder/type_spec.rb
washout_builder-1.5.5 spec/lib/washout_builder/type_spec.rb
washout_builder-1.5.4 spec/lib/washout_builder/type_spec.rb
washout_builder-1.5.3 spec/lib/washout_builder/type_spec.rb