Kaynağa Gözat

Add fake docs.json manifest for test environment

Thibaut 10 yıl önce
ebeveyn
işleme
ee4509f63e
2 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 4 0
      lib/app.rb
  2. 1 0
      test/files/docs.json

+ 4 - 0
lib/app.rb

@@ -81,6 +81,10 @@ class App < Sinatra::Application
     end
   end
 
+  configure :test do
+    set :docs_manifest_path, -> { File.join(root, 'test', 'files', 'docs.json') }
+  end
+
   helpers do
     include Sinatra::Cookies
     include Sprockets::Helpers

+ 1 - 0
test/files/docs.json

@@ -0,0 +1 @@
+[{"name":"CSS","slug":"css","type":"mdn","version":null,"index_path":"css/index.json","db_path":"css/db.json","mtime":1420139788,"db_size":3460507},{"name":"DOM","slug":"dom","type":"mdn","version":null,"index_path":"dom/index.json","db_path":"dom/db.json","mtime":1420139789,"db_size":11399128},{"name":"DOM Events","slug":"dom_events","type":"mdn","version":null,"index_path":"dom_events/index.json","db_path":"dom_events/db.json","mtime":1420139790,"db_size":889020},{"name":"HTML","slug":"html","type":"mdn","version":null,"index_path":"html/index.json","db_path":"html/db.json","mtime":1420139790,"db_size":1835646},{"name":"HTTP","slug":"http","type":"rfc","version":null,"index_path":"http/index.json","db_path":"http/db.json","mtime":1420139790,"db_size":183083},{"name":"JavaScript","slug":"javascript","type":"mdn","version":null,"index_path":"javascript/index.json","db_path":"javascript/db.json","mtime":1420139791,"db_size":4125477}]