Skip to content

Version 3.0.0

Compare
Choose a tag to compare
@gongo gongo released this 04 Apr 11:17
· 122 commits to master since this release

Notes

Use Gherkin4 [GH-184]

Fixes

For users (your *.feature and *_steps.rb)

Nothing. No need to change your files.

For developers (core)

Refactoring Modules: split into class and module

[GH-185]

  • Turnip::Builder::Tag

    • class Turnip::Node::Tag
    • module Turnip::Node::HasTags

    Usage:

    class FooNode
      include HasTags
    end

    FooNode implements #tags method.

  • Turnip::Builder::Line

    • class Turnip::Node::Location
    • module Turnip::Node::HasLocation

    Usage:

    class FooNode
      include HasLocation
    end

    FooNode implements #location and #line methods.

Refactoring Classes: rename

[GH-185]

Before class name (v2.1.1) After class name (v3.0.0) Maintain API compatibility?
Turnip::Builder::Feature Turnip::Node::Feature yes
Turnip::Builder::Scenario Turnip::Node::Scenario yes
Turnip::Builder::ScenarioOutline Turnip::Node::ScenarioOutline yes
Turnip::Builder::Background Turnip::Node::Background yes
Turnip::Builder::Step Turnip::Node::Step no (under-mentioned)

Breaking Changes

  • Turnip::Node::HasTags API [GH-186]

    # before (Turnip::Builder::Tag)
    node.tags      # => ['tag1', 'tag2']
    
    # after (Turnip::Node::HasTags)
    node.tags      # => [<Turnip::Node::Tag>, <Turnip::Node::Tag>]
    node.tag_names # => ['tag1', 'tag2']
  • Turnip::Node::Step API [GH-185]

    # before (Turnip::Builder::Step)
    step.extra_args # => `Array<String>` or `Turnip::Table`
    
    # after (Turnip::Node::Step)
    step.argument   # => `nil` , `String` or `Turnip::Table`
  • Turnip::Builder API [GH-187]

    # before
    builder = Turnip::Builder.build(feature_file)
    builder.features # => Array<Turnip::Builder::Feature>
    
    # after
    feature = Turnip::Builder.build(feature_file) # => Turnip::Node::Feature