Sha256: 58250601fd6ae7ffecd310b6ae28a87f8ee2b23cff4c47fbaa120a7bb2ce5024

Contents?: true

Size: 608 Bytes

Versions: 5

Compression:

Stored size: 608 Bytes

Contents

require 'spec_helper'
module Sexpr
  describe Processor, "use" do

    it 'installs the preprocessors properly' do
      expected = []
      Processor.preprocessors.should eq(expected)

      expected << [Preprocessed::Prefix, {:prefix => "prefix_"}]
      Preprocessed.preprocessors.should eq(expected)

      expected << [ {:upcased => SubPreprocessed::Upcase}, nil ]
      SubPreprocessed.preprocessors.should eq(expected)
    end

    it 'sets attribute readers for hashes' do
      Preprocessed.new.should_not respond_to(:upcased)
      SubPreprocessed.new.should respond_to(:upcased)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sexpr-1.1.0 spec/unit/processor/test_use.rb
sexpr-1.0.0 spec/unit/processor/test_use.rb
sexpr-0.6.0 spec/unit/processor/test_use.rb
sexpr-0.5.1 spec/processor/test_use.rb
sexpr-0.5.0 spec/processor/test_use.rb