Sha256: 79549a8c0273de16dc8fdbbfc1ea581bacdaa9df14c6dc55d602f29b025a6fcf
Contents?: true
Size: 1.03 KB
Versions: 9
Compression:
Stored size: 1.03 KB
Contents
require "spec_helper" describe Jsus::Documenter do subject { described_class.new } let(:input_dir) { "#{File.dirname(__FILE__)}/../data/Basic/app/javascripts/Orwik" } let(:pool) { Jsus::Pool.new(input_dir) } describe "<<" do it "should add source files to tree" do pool.sources.each {|s| subject << s} subject.tree["/Orwik/Color.js"].value.should be_a(Jsus::SourceFile) end end describe "#documented_sources" do before(:each) { pool.sources.each {|s| subject << s} } it "should return all sources by default" do subject.documented_sources.glob("/**/*").should have(4).elements end it "should accept #only scope as exclusive scope" do subject.only("/Orwik/Wid*").documented_sources.glob("/**/*").should have(1).element # /Orwik/Widget.js end it "should accept #or scope as additive scope" do # /Orwik/Widget.js, /Orwik/Input.js, /Orwik/Input.Color.js subject.only("/Orwik/Wid*").or("/Orwik/Inp*").documented_sources.glob("/**/*").should have(3).elements end end end
Version data entries
9 entries across 9 versions & 1 rubygems