Sha256: 28678f62442ed9837cba0733159f26d750b8c7d8e3d5d8aff347103104a48fd1

Contents?: true

Size: 912 Bytes

Versions: 50

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::Colours::Colour.new(background: '#ff0000', foreground: '#00ff00')
      }
      let(:expected)  {
        "{{eJxj4ci3kg5LTUkttbJyzs/JLy0qhjHYrQQckhKTs9OL8kvzUvKt5NGVOcEl2ax4HJLBwp5KPMppaQZAwGbF5hoCNCItvygVpxFucEk2aw6QXgMDkG42a84QAEnkMPA=}}"
      }

      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

50 entries across 50 versions & 1 rubygems

Version Path
vedeu-0.6.11 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.10 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.9 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.8 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.7 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.6 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.5 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.4 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.3 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.2 test/lib/vedeu/templating/encoder_test.rb