Sha256: c5e63f9c33ed73de192f3430658a5c144fe94d223e11aef94a5e892041691ca7

Contents?: true

Size: 911 Bytes

Versions: 75

Compression:

Stored size: 911 Bytes

Contents

require 'test_helper'

module Vedeu

  module Templating

    describe Decoder do

      let(:described) { Vedeu::Templating::Decoder }
      let(:instance)  { described.new(data) }
      let(:data)      {
        "{{eJxj4ci3kg5LTUkttbJyzs/JLy0qhjHYrQQckhKTs9OL8kvzUvKt5NGVOcEl2ax4HJLBwp5KPMppaQZAwGbF5hoCNCItvygVpxFucEk2aw6QXgMDkG42a84QAEnkMPA=}}"
      }
      let(:expected)  {
        Vedeu::Colours::Colour.new(background: '#ff0000', foreground: '#00ff00')
      }

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

      describe '.process' do
        subject { described.process(data) }

        it { subject.must_equal(expected) }
      end

      describe '#process' do
        it { instance.must_respond_to(:process) }
      end

    end # Decoder

  end # Templating

end # Vedeu

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
vedeu-0.6.16 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.15 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.14 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.13 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.12 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.11 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.10 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.9 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.8 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.7 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.6 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.5 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.4 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.3 test/lib/vedeu/templating/decoder_test.rb
vedeu-0.6.2 test/lib/vedeu/templating/decoder_test.rb