Sha256: 794d5357651ccddeeb1f70acc3f9c50fcb4ed346481e72e499c5be7063af33fb

Contents?: true

Size: 880 Bytes

Versions: 25

Compression:

Stored size: 880 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/JLy0qhjHYrQQckhKTs9OL8kvzUjyVeJTT0gyAgM2KzTUEKJeWX5SKkDMwAMmyWbOHAAAseBhK}}"
      }

      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

25 entries across 25 versions & 1 rubygems

Version Path
vedeu-0.8.0 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.7.4 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.7.3 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.7.2 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.7.1 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.7.0 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.71 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.70 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.69 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.68 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.67 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.66 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.65 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.64 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.63 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.62 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.61 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.60 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.59 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.6.58 test/lib/vedeu/templating/encoder_test.rb