Class: Booth::Testing::Support::Scenario
- Inherits:
-
Object
- Object
- Booth::Testing::Support::Scenario
- Defined in:
- lib/booth/testing/support/scenario.rb
Instance Attribute Summary collapse
-
#after_credential ⇒ Object
Returns the value of attribute after_credential.
-
#before_test ⇒ Object
Returns the value of attribute before_test.
-
#routing_namespace ⇒ Object
Returns the value of attribute routing_namespace.
-
#scope ⇒ Object
Returns the value of attribute scope.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(klass) ⇒ Scenario
constructor
A new instance of Scenario.
- #name ⇒ Object
Constructor Details
#initialize(klass) ⇒ Scenario
Returns a new instance of Scenario.
9 10 11 |
# File 'lib/booth/testing/support/scenario.rb', line 9 def initialize(klass) @klass = klass end |
Instance Attribute Details
#after_credential ⇒ Object
Returns the value of attribute after_credential.
7 8 9 |
# File 'lib/booth/testing/support/scenario.rb', line 7 def after_credential @after_credential end |
#before_test ⇒ Object
Returns the value of attribute before_test.
7 8 9 |
# File 'lib/booth/testing/support/scenario.rb', line 7 def before_test @before_test end |
#routing_namespace ⇒ Object
Returns the value of attribute routing_namespace.
7 8 9 |
# File 'lib/booth/testing/support/scenario.rb', line 7 def routing_namespace @routing_namespace end |
#scope ⇒ Object
Returns the value of attribute scope.
7 8 9 |
# File 'lib/booth/testing/support/scenario.rb', line 7 def scope @scope end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'lib/booth/testing/support/scenario.rb', line 17 def call @klass.call routing_namespace:, scope:, before_test:, after_credential: end |
#name ⇒ Object
13 14 15 |
# File 'lib/booth/testing/support/scenario.rb', line 13 def name @klass.to_s.underscore.parameterize(separator: '_') end |