diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcd4cdc..636463e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,8 @@ jobs: - '2.7' - '3.0' - '3.1' + - '3.2' + - '3.3' - jruby gemfiles: - gemfiles/Gemfile-rspec-3.11.x diff --git a/CHANGELOG.md b/CHANGELOG.md index d14a582..21e0f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [4.4.1] - 2024-08-09 + +### Fixed + +- Fix tags on scenario outline [[GH-252](https://github.com/jnicklas/turnip/pull/252)] + ## [4.4.0] - 2022-11-04 ### Added diff --git a/examples/tags.feature b/examples/tags.feature index 99a71ad..3b29455 100644 --- a/examples/tags.feature +++ b/examples/tags.feature @@ -12,3 +12,15 @@ Feature: With tags When I attack it And I attack it Then it should die + + @variety + Scenario Outline: With tag on scenario outline + Given there is a monster + When I attack it + And I attack it + Then it should die + + Examples: + | Monster Type | + | weak | + | strong | diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5fd2390 --- /dev/null +++ b/flake.lock @@ -0,0 +1,24 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", + "path": "/nix/store/4jfc6vrkmq7z5pb651jh5b4kra5f1kwp-source", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ebbe8ca --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + description = "Ruby dev environment"; + + inputs = { }; + + outputs = { self, nixpkgs }: + let + # Helper to provide system-specific attributes + forAllSupportedSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + + supportedSystems = [ + "aarch64-darwin" + "aarch64-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + in + + { + devShells = forAllSupportedSystems ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + ruby_3_2 + ]; + }; + }); + }; +} diff --git a/lib/turnip/node/scenario_outline.rb b/lib/turnip/node/scenario_outline.rb index b62bbb0..7a02b67 100644 --- a/lib/turnip/node/scenario_outline.rb +++ b/lib/turnip/node/scenario_outline.rb @@ -125,6 +125,7 @@ def convert_metadata_to_scenario(header, row) scenario.steps = original.steps scenario.source_line = original.source_line scenario.source_column = original.source_column + scenario.tags = original.tags end end diff --git a/lib/turnip/version.rb b/lib/turnip/version.rb index bb67aed..5451beb 100644 --- a/lib/turnip/version.rb +++ b/lib/turnip/version.rb @@ -1,3 +1,3 @@ module Turnip - VERSION = '4.4.0' + VERSION = '4.4.1' end diff --git a/spec/builder_spec.rb b/spec/builder_spec.rb index 2d4849a..a8c5b93 100644 --- a/spec/builder_spec.rb +++ b/spec/builder_spec.rb @@ -48,6 +48,8 @@ expect(feature.tags[0]).to be_instance_of Turnip::Node::Tag expect(feature.scenarios[0].tags[0].name).to eq 'cool' expect(feature.scenarios[1].tag_names).to eq ['stealthy', 'wicked'] + expect(feature.scenarios[2].tag_names).to eq ['variety'] + expect(feature.scenarios[3].tag_names).to eq ['variety'] end end diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 7b001c4..8dc92f9 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -12,7 +12,7 @@ end it "prints out failures and successes" do - @result.should include('46 examples, 4 failures, 6 pending') + @result.should include('48 examples, 4 failures, 7 pending') end it "includes features in backtraces" do