Sha256: 9bb78dea3190184b10d7da6247f93e864e26868fa6bad7cb5bc44b64a79e23ef

Contents?: true

Size: 1.56 KB

Versions: 48

Compression:

Stored size: 1.56 KB

Contents

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

module Cucumber
  module Ast
    describe Feature do
      include FeatureFactory

      it "should convert to sexp" do
        step_mother = StepMother.new
        step_mother.load_natural_language('en')
        step_mother.load_programming_language('rb')
        dsl = Object.new 
        dsl.extend RbSupport::RbDsl

        feature = create_feature(dsl)
        feature.to_sexp.should == 
        [:feature,
          "features/pretty_printing.feature",
          "Pretty printing", 
          [:comment, "# My feature comment\n"], 
          [:tag, "one"], 
          [:tag, "two"], 
          [:background, 2, 'Background:',
            [:step, 3, "Given", "a passing step"]],
          [:scenario, 9, "Scenario:", 
            "A Scenario", 
            [:comment, "    # My scenario comment  \n# On two lines \n"], 
            [:tag, "three"], 
            [:tag, "four"],
            [:step_invocation, 3, "Given", "a passing step"], # From the background
            [:step_invocation, 10, "Given", "a passing step with an inline arg:",
              [:table, 
                [:row, -1,
                  [:cell, "1"], [:cell, "22"], [:cell, "333"]], 
                [:row, -1,
                  [:cell, "4444"], [:cell, "55555"], [:cell, "666666"]]]], 
            [:step_invocation, 11, "Given", "a happy step with an inline arg:", 
              [:py_string, "\n I like\nCucumber sandwich\n"]], 
            [:step_invocation, 12, "Given", "a failing step"]]]
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 8 rubygems

Version Path
kosmas58-cucumber-0.3.99 spec/cucumber/ast/feature_spec.rb
cucumber-0.5.3 spec/cucumber/ast/feature_spec.rb
cucumber-0.5.2 spec/cucumber/ast/feature_spec.rb
cucumber-0.5.1 spec/cucumber/ast/feature_spec.rb
cucumber-0.5.0 spec/cucumber/ast/feature_spec.rb
cucumber-0.4.5.rc2 spec/cucumber/ast/feature_spec.rb
kbaum-cucumber-0.4.5.pre spec/cucumber/ast/feature_spec.rb
cucumber-0.4.5.rc1 spec/cucumber/ast/feature_spec.rb
middleman-0.10.17 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/ast/feature_spec.rb
middleman-0.10.16 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/ast/feature_spec.rb
middleman-0.10.15 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/ast/feature_spec.rb
rackjour-0.1.8 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/ast/feature_spec.rb
middleman-0.10.14 vendor/gems/gems/cucumber-0.4.4/spec/cucumber/ast/feature_spec.rb
cucumber-0.4.4 spec/cucumber/ast/feature_spec.rb
cucumber-0.4.3 spec/cucumber/ast/feature_spec.rb
cucumber-0.4.2 spec/cucumber/ast/feature_spec.rb
cucumber-0.4.1 spec/cucumber/ast/feature_spec.rb
cucumber-0.4.0 spec/cucumber/ast/feature_spec.rb
cucumber-0.4.0.rc1 spec/cucumber/ast/feature_spec.rb
cucumber-0.3.104 spec/cucumber/ast/feature_spec.rb