Sha256: 192099cc8b66e2d646d227fde84a2a8992f31d5450dfb0b7652085cc9b1b6c09

Contents?: true

Size: 559 Bytes

Versions: 14

Compression:

Stored size: 559 Bytes

Contents

# -*- encoding : utf-8 -*-
require "card/content/chunk"

describe Card::Content::Chunk, "Chunk" do
  context "Class" do
    it "populates prefix map on load" do
      expect(Card::Content::Chunk.prefix_map_by_list[:default].keys.size)
        .to be > 0
      expect(Card::Content::Chunk.prefix_map_by_list[:default]["{"][:class])
        .to eq(Card::Content::Chunk::Nest)
    end

    it "finds Chunk classes using matched prefix" do
      expect(Card::Content::Chunk.find_class_by_prefix("{{"))
        .to eq(Card::Content::Chunk::Nest)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
card-1.93.3 spec/lib/card/chunk_spec.rb
card-1.93.2 spec/lib/card/chunk_spec.rb
card-1.93.1 spec/lib/card/chunk_spec.rb
card-1.93.0 spec/lib/card/chunk_spec.rb
card-1.92.2 spec/lib/card/chunk_spec.rb
card-1.92.1 spec/lib/card/chunk_spec.rb
card-1.92 spec/lib/card/chunk_spec.rb
card-1.91 spec/lib/card/chunk_spec.rb
card-1.21.0 spec/lib/card/chunk_spec.rb
card-1.20.4 spec/lib/card/chunk_spec.rb
card-1.20.3 spec/lib/card/chunk_spec.rb
card-1.20.2 spec/lib/card/chunk_spec.rb
card-1.20.1 spec/lib/card/chunk_spec.rb
card-1.20.0 spec/lib/card/chunk_spec.rb