Sha256: d2d04c98a59940591bd4d33c6c4b85e91cce7178366c9346c66151c2468a3d26

Contents?: true

Size: 912 Bytes

Versions: 4

Compression:

Stored size: 912 Bytes

Contents

require 'test_helper'

module Vedeu

  module Templating

    describe Encoder do

      let(:described) { Vedeu::Templating::Encoder }
      let(:instance)  { described.new(data) }
      let(:data)      {
        Vedeu::Colour.new(background: '#ff0000', foreground: '#00ff00')
      }
      let(:expected)  {
        "{{eJxj4ci3EgpLTUkttbJyzs/JLy1itxJwSEpMzk4vyi/NS8m3EoPKOsHF2Kx4HJLBaj" \
        "2VeJTT0gyAgM2KzTUEqDMtvygVXacbXIzNmgOkxcAApInNmjMEAAMcJsQ=}}"
      }

      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 # Encoder

  end # Templating

end # Vedeu

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.6.1 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.0 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.5.13 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.5.12 test/lib/vedeu/templating/encoder_test.rb