Sha256: b124713bdf09955f4752f07d26be8ad3344d830cec60551650346e05e865e757
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 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::Runtime.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) 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="", title="", description="", 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber-0.10.7 | spec/cucumber/ast/scenario_spec.rb |