Sha256: 2c9a1984ad070d4ee6f1e954873a3fa4cfd51296581bb5dcc4f102660ee066be
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
require 'spec_helper' require 'bitmapped/exceptions' describe Validators::ValidateBitmapInitialised do subject { Validators::ValidateBitmapInitialised } context 'given an initialised bitmap' do let(:bitmap) { Bitmap.new } it 'should not raise a BitmapNotInitialised error' do bitmap.command(["I", "4", "4"]) expect{subject.parse_and_validate(bitmap)}.to_not raise_error end end context 'given an uninitialised bitmap' do let(:invalid_inputs) { [["A", "2"], ["2", "Z"], ["99"]] } it 'should raise a BitmapNotInitialised error' do invalid_inputs.each do |input| expect{Validators::ValidateColumnRowInput.parse_and_validate(input)}.to raise_error(ParsingError) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bitmapped-0.2.0 | spec/validators/validate_bitmap_initialised_spec.rb |