Class: Spec::Story::Runner::StoryParser::StoryState

Inherits:
State
  • Object
show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb

Instance Method Summary collapse

Methods inherited from State

#comment, #given_scenario, #initialize, #remove_tag_from

Constructor Details

This class inherits a constructor from Spec::Story::Runner::StoryParser::State

Instance Method Details

#eofObject



187
188
189
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 187

def eof
  @parser.create_story
end

#event(line) ⇒ Object



175
176
177
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 175

def event(line)
  other(line)
end

#given(line) ⇒ Object



171
172
173
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 171

def given(line)
  other(line)
end

#one_more_of_the_same(line) ⇒ Object



156
157
158
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 156

def one_more_of_the_same(line)
  other(line)
end

#other(line) ⇒ Object



183
184
185
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 183

def other(line)
  @parser.add_story_line(line)
end

#outcome(line) ⇒ Object



179
180
181
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 179

def outcome(line)
  other(line)
end

#scenario(line) ⇒ Object



165
166
167
168
169
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 165

def scenario(line)
  @parser.create_story
  @parser.create_scenario(line)
  @parser.transition_to(:scenario_state)
end

#story(line) ⇒ Object



160
161
162
163
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/story_parser.rb', line 160

def story(line)
  @parser.create_story
  @parser.add_story_line(line)
end