Sha256: 253dc02a77155b3fc4ead3c85f1aa1a4326c64a2f1cce9607dd4e7ab9354eb3d

Contents?: true

Size: 922 Bytes

Versions: 81

Compression:

Stored size: 922 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'
require 'cucumber/step_mother'
require 'cucumber/ast'

module Cucumber
  module Ast
    describe Scenario do
      before do
        @step_mother = Object.new
        @step_mother.extend(StepMother)
        $x = $y = nil
        @step_mother.Given /y is (\d+)/ do |n|
          $y = n.to_i
        end
        @visitor = Visitor.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")
          ])
        @visitor.visit_feature_element(scenario)

        $y.should == nil
      end

    end
  end
end

Version data entries

81 entries across 81 versions & 8 rubygems

Version Path
aslakhellesoy-cucumber-0.2.3.3 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.2.3.4 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.0.1 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.0 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.1.1 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.1 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.10 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.11.1 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.11.200907091518 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.11.3 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.11.5 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.11.6 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.11 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.2 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.3.1 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.3.2 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.3.3 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.3.4 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.3.5 spec/cucumber/ast/scenario_spec.rb
aslakhellesoy-cucumber-0.3.3.6 spec/cucumber/ast/scenario_spec.rb