Class: RBehave::Scenario

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(story, name, &body) ⇒ Scenario

Returns a new instance of Scenario.

Raises:

  • (ArgumentError)


5
6
7
8
9
10
# File 'lib/rbehave/scenario.rb', line 5

def initialize(story, name, &body)
  raise ArgumentError, 'Scenario must have a body' unless block_given?
  @story = story
  @name = name
  @body = body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/rbehave/scenario.rb', line 3

def body
  @body
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rbehave/scenario.rb', line 3

def name
  @name
end

#storyObject

Returns the value of attribute story.



3
4
5
# File 'lib/rbehave/scenario.rb', line 3

def story
  @story
end