Sha256: 255b378923a7eb641872de8c41b6ccc3fd52a325f6dba7fd84751aca4b3602c4

Contents?: true

Size: 1.3 KB

Versions: 1

Compression:

Stored size: 1.3 KB

Contents

require 'test_helper'

module Vedeu

  describe Colours do

    let(:described) { Vedeu::Colours }
    let(:instance)  { described.new }

    describe '#initialize' do
      it { instance.must_be_instance_of(described) }
      it { instance.instance_variable_get('@storage').must_equal({}) }
    end

    describe '#register' do
      let(:colour)          {}
      let(:escape_sequence) {}

      subject { instance.register(colour, escape_sequence) }
    end

    describe '#registered?' do
      let(:colour) {}

      subject { instance.registered?(colour) }
    end

    describe '#reset!' do
      subject { instance.reset! }

      it { subject.must_be_instance_of(Hash) }

      it { subject.must_equal({}) }
    end

    describe '#retrieve' do
      let(:colour) {}

      subject { instance.retrieve(colour) }

      context 'when the colour can be found' do
      end

      context 'when the colour cannot be found' do
        it { subject.must_equal('') }
      end
    end

    describe '#retrieve_or_register' do
      let(:colour)          {}
      let(:escape_sequence) {}

      subject { instance.retrieve_or_register(colour, escape_sequence) }

      context 'when the colour is registered' do
      end

      context 'when the colour is not registered' do
      end
    end

  end # Colours

end # Vedeu

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.4.22 test/lib/vedeu/repositories/repositories/colours_test.rb