Skip to content

lpenaflor/cucumber-formatter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cucumber-formatter

Circle CI

Custom formatter for Cucumber that defends against timecop overriding Time.now.

The _circleci_formatter.rb file should be dumped into the features/support directory and specified with Cucumber's --format flag:

bundle exec cucumber --format CircleCICucumberFormatter::CircleCIJson

How it works

Timecop redefines Time.now to Time.now_without_mock_time. If that method exists, then we call that method instead of Time.now.

This approach is somewhat brittle because it relies on the internals of before_step and after_step not changing.

About

Custom formatter for Cucumber

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 71.3%
  • Shell 24.3%
  • Gherkin 4.4%