Class: Cucumber::Core::Compiler::TestCaseBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/closer/cucumber_ext/compiler.rb

Instance Method Summary collapse

Instance Method Details

#on_test_case(source) ⇒ Object


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/closer/cucumber_ext/compiler.rb', line 8

def on_test_case(source)
  valid_test_case = false
  resume_story_from = ENV['RESUME_STORY_FROM'].to_s

  if resume_story_from.empty?
    valid_test_case = true
  else
    @feature, scenario = *source
    if @feature.location.file >= resume_story_from
      valid_test_case = true
    end
  end

  if valid_test_case
    Test::Case.new(test_steps, source).describe_to(receiver) #if test_steps.count > 0
  end
  @test_steps = nil
  self
end