History

Make Docs::Scraper.root_path inheritable

Thibaut committed 13 years ago

Commit 12043901 parent aed8f222 files · +5 −0Browse files

Unified · Split

2 files
  1. lib/docs/core/scraper.rb +1 −0
  2. test/lib/docs/core/scraper_test.rb +4 −0
lib/docs/core/scraper.rb+1−0
@@ -14,6 +14,7 @@ module Docs · 13 unmodified lines
1414 autoload_all "docs/filters/#{to_s.demodulize.underscore}", 'filter'
1515 end
1616
17+ subclass.root_path = root_path
1718 subclass.options = options.deep_dup
1819 subclass.html_filters = html_filters.inheritable_copy
1920 subclass.text_filters = text_filters.inheritable_copy
test/lib/docs/core/scraper_test.rb+4−0
@@ -33,6 +33,10 @@ class DocsScraperTest < MiniTest::Spec · 32 unmodified lines
3333 assert_equal Scraper.type, subclass.type
3434 end
3535
36+ it "sets .root_path" do
37+ assert_equal Scraper.root_path, subclass.root_path
38+ end
39+
3640 it "duplicates .options" do
3741 stub(Scraper).options { { test: [] } }
3842 assert_equal Scraper.options, subclass.options