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.51 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.50 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.49 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.48 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.47 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.46 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.45 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.44 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.43 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.42 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.41 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.40 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.39 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.38 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.37 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.36 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.35 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.34 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.33 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.32 test/lib/vedeu/templating/encoder_test.rb