Class: ViewSpec::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/view_spec/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defaultsObject



12
13
14
15
16
17
18
19
20
# File 'lib/view_spec/config.rb', line 12

def defaults
  ActiveSupport::OrderedOptions.new.merge!({
    spec_paths: ["#{Rails.root}/view_specs"],
    spec_files: [],
    spec_file_suffix: "_vspec",
    preview_controller: "ApplicationController",
    preview_layout: "application"
  })
end

Instance Method Details

#preview_controllerObject



7
8
9
# File 'lib/view_spec/config.rb', line 7

def preview_controller
  config.preview_controller.is_a?(String) ? config.preview_controller.constantize : config.preview_controller
end