Sha256: c976d82d22d2420db2d06aa359a04aeb03b008132fd5e141ff37dac5ce9fd31d

Contents?: true

Size: 851 Bytes

Versions: 4

Compression:

Stored size: 851 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.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.4.64 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.4.63 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.4.62 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.4.61 test/lib/vedeu/templating/encoder_test.rb