Sha256: e39c89e2bf1f20a2016a1f4a3f711f258760f9c9d6af8d70a2b05ca96bbbb830

Contents?: true

Size: 914 Bytes

Versions: 2

Compression:

Stored size: 914 Bytes

Contents

require 'spec_helper'

module Lucid
  describe ContextLoader::Facade do

    let(:interface) {double('interface')}
    subject { ContextLoader::Orchestrator.new(interface,{}) }
    let(:facade) { ContextLoader::Facade.new(subject, interface) }

    it 'should produce AST::Table by #table' do
      facade.table( %{
      | study   | phase |
      | test-01 | I     |
      | test-02 | II    |
      } ).should be_kind_of(AST::Table)
    end

    it 'should produce AST::DocString by #doc_string with default content-type' do
      str = facade.doc_string('TEST')
      str.should be_kind_of(AST::DocString)
      str.content_type.should eq('')
    end

    it 'should produce AST::DocString by #doc_string with ruby content-type' do
      str = facade.doc_string('TEST','ruby')
      str.should be_kind_of(AST::DocString)
      str.content_type.should eq('ruby')
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lucid-0.4.1 spec/lucid/facade_spec.rb
lucid-0.4.0 spec/lucid/facade_spec.rb