Class: ViewSpec::Scenario

Inherits:
Entry
  • Object
show all
Defined in:
lib/view_spec/scenario.rb

Instance Method Summary collapse

Methods inherited from Entry

#initialize, #method_missing, #respond_to_missing?, #short_identifier, #source_file, #spec, #title, #to_partial_path, type

Constructor Details

This class inherits a constructor from ViewSpec::Entry

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ViewSpec::Entry

Instance Method Details

#preview(**options) ⇒ Object

Raises:



4
5
6
7
8
# File 'lib/view_spec/scenario.rb', line 4

def preview(**options)
  raise NoPreviewError, "no preview defined" if context.preview.nil?

  ScenarioPreview.new(self, context.preview, **options)
end

#to_paramObject



10
11
12
# File 'lib/view_spec/scenario.rb', line 10

def to_param
  short_identifier
end