Sha256: 77793e1f2c1dfd7164ccf9ded9374937046b0de4d37e38d195816b3407fec4bf

Contents?: true

Size: 760 Bytes

Versions: 3

Compression:

Stored size: 760 Bytes

Contents

require "spec_helper"

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

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

  it "only allows multiple 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", method: "")
      Docks::Process.process(symbol)
      expect(symbol[subject.name]).to be true
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

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