Sha256: d7ed63e9c8d9bdaf88f5257fa3df4a497bdb403481cb9a63d3fed1549d512d49

Contents?: true

Size: 911 Bytes

Versions: 31

Compression:

Stored size: 911 Bytes

Contents

# frozen_string_literal: true

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

31 entries across 31 versions & 1 rubygems

Version Path
vedeu-0.8.32 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.31 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.30 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.29 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.28 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.27 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.26 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.25 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.24 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.23 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.22 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.21 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.20 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.19 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.18 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.17 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.16 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.15 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.14 test/lib/vedeu/templating/encoder_test.rb
vedeu-0.8.13 test/lib/vedeu/templating/encoder_test.rb