mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Make Docs::Scraper.root_path inheritable
This commit is contained in:
parent
aed8f22c99
commit
1204390f81
2 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,7 @@ module Docs
|
|||
autoload_all "docs/filters/#{to_s.demodulize.underscore}", 'filter'
|
||||
end
|
||||
|
||||
subclass.root_path = root_path
|
||||
subclass.options = options.deep_dup
|
||||
subclass.html_filters = html_filters.inheritable_copy
|
||||
subclass.text_filters = text_filters.inheritable_copy
|
||||
|
|
|
@ -33,6 +33,10 @@ class DocsScraperTest < MiniTest::Spec
|
|||
assert_equal Scraper.type, subclass.type
|
||||
end
|
||||
|
||||
it "sets .root_path" do
|
||||
assert_equal Scraper.root_path, subclass.root_path
|
||||
end
|
||||
|
||||
it "duplicates .options" do
|
||||
stub(Scraper).options { { test: [] } }
|
||||
assert_equal Scraper.options, subclass.options
|
||||
|
|
Loading…
Reference in a new issue