Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b2217b64f5
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (37 sloc) 0.907 kB
require "jsduck/aggregator"
require "jsduck/source_file"
describe JsDuck::Aggregator do
def parse(string)
agr = JsDuck::Aggregator.new
agr.aggregate(JsDuck::SourceFile.new(string))
agr.result
end
shared_examples_for "private" do
before do
@doc = parse("/**\n * #{@tagname}\n */")[0]
end
it "marks item as private" do
@doc[:private].should == true
end
end
describe "@private" do
before { @tagname = "@private" }
it_should_behave_like "private"
end
describe "@hide" do
before { @tagname = "@hide" }
it_should_behave_like "private"
end
describe "@ignore" do
before { @tagname = "@ignore" }
it_should_behave_like "private"
end
describe "@protected" do
before do
@doc = parse("/**\n * @protected\n */")[0]
end
it "marks item as protected" do
@doc[:protected].should == true
end
end
end
Jump to Line
Something went wrong with that request. Please try again.