Sha256: 79fa407a7b1b05ee0c254364627dead8324f040af81b52c2a244f1e63afbb147
Contents?: true
Size: 1.12 KB
Versions: 7
Compression:
Stored size: 1.12 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') require 'cucumber/step_mother' require 'cucumber/ast' require 'cucumber/rb_support/rb_language' module Cucumber module Ast describe Scenario do before do @step_mother = Cucumber::StepMother.new @step_mother.load_programming_language('rb') @dsl = Object.new @dsl.extend(Cucumber::RbSupport::RbDsl) $x = $y = nil @dsl.Given /y is (\d+)/ do |n| $y = n.to_i end @visitor = TreeWalker.new(@step_mother) @visitor.options = {} end it "should skip steps when previous is not passed" do scenario = Scenario.new( background=nil, comment=Comment.new(""), tags=Tags.new(98, []), line=99, keyword="", name="", steps=[ Step.new(7, "Given", "this is missing"), Step.new(8, "Given", "y is 5") ] ) scenario.feature = mock('feature').as_null_object @visitor.visit_feature_element(scenario) $y.should == nil end end end end
Version data entries
7 entries across 7 versions & 1 rubygems