Class: MongoBrowser::Middleware::SprocketsSpecs
- Inherits:
-
SprocketsBase
- Object
- SprocketsBase
- MongoBrowser::Middleware::SprocketsSpecs
- Defined in:
- lib/mongo_browser/middleware/sprockets_specs.rb
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ SprocketsSpecs
constructor
A new instance of SprocketsSpecs.
Methods inherited from SprocketsBase
Constructor Details
#initialize(app, options = {}) ⇒ SprocketsSpecs
Returns a new instance of SprocketsSpecs.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/mongo_browser/middleware/sprockets_specs.rb', line 6 def initialize(app, = {}) @app = app @root = [:root] path = [:path] || "_specs" @matcher = /^\/#{path}\/*/ @environment = ::Sprockets::Environment.new(@root) # Serve specs @environment.append_path "spec/javascripts" end |