cucumber / cucumber-cpp

Support for writing Cucumber step definitions in C++
MIT License
309 stars 132 forks source link

cucumber-cpp does not work with the latest cucumber ruby version (3.1) #200

Closed jesusha123 closed 6 years ago

jesusha123 commented 6 years ago

Summary

Cucumber-cpp does not work with the latest cucumber-ruby version (3.1)

Expected Behavior

Cucumber-cpp works with the latest cucumber-ruby version.

Current Behavior

Compiling cucumber-cpp and running the examples+cucumber throw "undefined definition" messages.

Possible Solution

Workaround:

  1. Uninstall cucumber-ruby 3.1.2: sudo gem uninstall cucumber
  2. Install cucumber-ruby 2.4: sudo gem install cucumber -v 2.4
  3. Run cucumber from the examples/Calc, not from the project root as described in the readme instructions ("cd examples/Calc && cucumber ."), otherwise you'll still get undefined definitions, even with cucumber-ruby 2.4.

Steps to Reproduce (for bugs)

  1. Install ubuntu 18.04
  2. Install dependencies with apt (boost, qt, g++, cmake, gtest, ruby)
  3. Install bundler and cucumber-ruby with gem package manager (gem install bundler cucumber)
  4. Follow the readme instructions to compile cucumber-cpp and examples
  5. Run one of the examples

build/examples/Calc/BoostCalculatorSteps >/dev/null & cucumber examples/Calc

  1. Cucumber throws a bunch of undefined definitions

Context & Motivation

I struggled for hours to run cucumber-cpp examples. What I am trying to accomplish? This issue to be fixed, and let other developers know (by having the doc changed) that cucumber-cpp does not work with the latest version of cucumber-ruby, so they don't waste hours of their time.

Your Environment

paoloambrosio commented 6 years ago

I believe it is a duplicate of #194 and #179.

It was a bug in Cucumber-Ruby:

It looks like the fix is targeting Cucumber-Ruby 4.0.0 yet unreleased.