Sha256: 683d270b53fd1c544453ae302fcfbc017826a266d1934dd744cf85238e10f9bf

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

require 'test_helper'

module Vedeu

  describe Compressor do

    let(:described) { Vedeu::Compressor }
    let(:instance)  { described.new(output) }
    let(:output)    {}

    describe '#initialize' do
      it { instance.must_be_instance_of(Vedeu::Compressor) }
      it { instance.instance_variable_get('@output').must_equal(output) }
      it { instance.instance_variable_get('@colour').must_equal('') }
      it { instance.instance_variable_get('@style').must_equal('') }
    end

    describe '#render' do
      subject { instance.render }

      it { subject.must_be_instance_of(String) }

      context 'when the output is all Vedeu::Char elements' do

      end

      context 'when the output is not all Vedeu::Char elements' do
        let(:output) {
          [
            Vedeu::Char.new(value: 'N'),
            'o',
            Vedeu::Char.new(value: 't'),
          ]
        }
        it 'converts the non-Vedeu::Char elements into String elements' do
          subject.must_equal('Not')
        end
      end
    end

  end # Compressor

end # Vedeu

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.4.17 test/lib/vedeu/output/compressor_test.rb
vedeu-0.4.16 test/lib/vedeu/output/compressor_test.rb
vedeu-0.4.15 test/lib/vedeu/output/compressor_test.rb
vedeu-0.4.14 test/lib/vedeu/output/compressor_test.rb