-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for message formatters with dry runs I've just applied the suggest from @cbochs in #1496 Co-authored-by: Matt Wynne <matt@cucumber.io>
- Loading branch information
1 parent
3b03852
commit cf4277d
Showing
5 changed files
with
77 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
require 'cucumber/formatter/spec_helper' | ||
require 'cucumber/formatter/message' | ||
require 'cucumber/cli/options' | ||
|
||
module Cucumber | ||
module Formatter | ||
describe Message do | ||
extend SpecHelperDsl | ||
include SpecHelper | ||
|
||
before(:each) do | ||
Cucumber::Term::ANSIColor.coloring = false | ||
@out = StringIO.new | ||
@formatter = Message.new(actual_runtime.configuration.with_options(out_stream: @out)) | ||
end | ||
|
||
describe 'given a single feature' do | ||
before(:each) do | ||
run_defined_feature | ||
end | ||
|
||
describe 'with a scenario' do | ||
define_feature <<-FEATURE | ||
Feature: Banana party | ||
Scenario: Monkey eats banana | ||
Given there are bananas | ||
FEATURE | ||
|
||
it 'outputs the undefined step' do | ||
expect(@out.string).to include '"status":"UNDEFINED"' | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters