Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pollute RbWorld with the AnsiEscapes methods #221

Merged
merged 1 commit into from
Feb 19, 2012

Conversation

Empact
Copy link
Contributor

@Empact Empact commented Feb 7, 2012

My alternate solution to #219. Alias AnsiEscapes where it's needed and call the methods on the module itself.

One failure on the full suite that I'm hoping someone can help with:

Using the default profile...
..........................................................................................................................................................................Using Cucumber, Unknown
Loading Spork.prefork block...
I'm loading all the heavy stuff...
Spork is ready and listening on 8990!
.Running tests with args ["features/sample.feature", "-r", "features", "--tags", "~@wip", "--format", "pretty", "--strict", "--tags", "~@wip", "--no-profile"]...
Done.

.......Using Cucumber, Unknown
Loading Spork.prefork block...
I'm loading all the heavy stuff...
Spork is ready and listening on 8990!
.Running tests with args ["features/sample.feature", "--tags", "~@wip", "--format", "pretty", "--strict", "--tags", "~@wip", "--no-profile"]...
Done.

............................................F...........................................

(::) failed steps (::)

expected "F\n\n(::) failed steps (::)\n\nundefined method `failed' for Gherkin::Formatter::AnsiEscapes:Module (NoMethodError)\n./features/step_definitions/test_steps2.rb:2:in `/two turtles/'\nfeatures/test_feature_1.feature:3:in `Given two turtles'\n\nFailing Scenarios:\ncucumber features/test_feature_1.feature:2 # Scenario: Test Scenario 1\n\n1 scenario (1 failed)\n1 step (1 failed)\n0m0.012s\n" to include "WARNING"
Diff:
@@ -1,2 +1,15 @@
-["WARNING"]
+F
+
+(::) failed steps (::)
+
+undefined method `failed' for Gherkin::Formatter::AnsiEscapes:Module (NoMethodError)
+./features/step_definitions/test_steps2.rb:2:in `/two turtles/'
+features/test_feature_1.feature:3:in `Given two turtles'
+
+Failing Scenarios:
+cucumber features/test_feature_1.feature:2 # Scenario: Test Scenario 1
+
+1 scenario (1 failed)
+1 step (1 failed)
+0m0.012s
 (RSpec::Expectations::ExpectationNotMetError)
features/nested_steps.feature:60:in `Then the output should contain "WARNING"'

Failing Scenarios:
cucumber features/nested_steps.feature:52 # Scenario: Use deprecated i18n methods

37 scenarios (1 failed, 36 passed)
237 steps (1 failed, 236 passed)
0m17.538s

That is, the failure doesn't occur when run directly, but seems to occur with spork. The failure itself (undefined method `failed' for Gherkin::Formatter::AnsiEscapes:Module) is demonstrably false, so I'm not sure what's up.

@Empact
Copy link
Contributor Author

Empact commented Feb 7, 2012

Incidentally, this makes use of cucumber/gherkin#161, and should solve #219

@aslakhellesoy aslakhellesoy merged commit 50fedc1 into cucumber:master Feb 19, 2012
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants