Sha256: 2b6cac53004d3ceda29486416b91e17d804b746b04e1f0b20590a90632aab357

Contents?: true

Size: 767 Bytes

Versions: 3

Compression:

Stored size: 767 Bytes

Contents

require "spec_helper"

describe Docks::Tags::Property do
  subject { Docks::Tags::Property.instance }

  it "does not allow multiline content" do
    expect(subject.multiline?).to be false
  end

  it "only allows one tag per block" do
    expect(subject.multiple_allowed?).to be false
  end

  describe "#process" do
    it "marks the attribute as true" do
      symbol = Docks::Containers::Symbol.new(name: "foo", property: "")
      Docks::Process.process(symbol)
      expect(symbol[subject.name]).to be true
    end

    it "forces the symbol to be a variable type" do
      symbol = Docks::Containers::Symbol.new(name: "foo", property: "")
      symbol = Docks::Process.process(symbol)
      expect(symbol).to be_a Docks::Containers::Variable
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
docks_app-0.0.3 spec/lib/tags/property_tag_spec.rb
docks_app-0.0.2 spec/lib/tags/property_tag_spec.rb
docks_app-0.0.1 spec/lib/tags/property_tag_spec.rb