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

Scenario Outlines failing #170

Closed
dkowis opened this issue Jan 24, 2012 · 1 comment
Closed

Scenario Outlines failing #170

dkowis opened this issue Jan 24, 2012 · 1 comment

Comments

@dkowis
Copy link
Member

dkowis commented Jan 24, 2012

Problem: Scenario Outline Examples are not being properly substituted into the scenario Outline when being run. Only happens when being run by the CLI, not when running via JUnit.

I found the problem: It's in commit 41493c8 that is mentioned to close #146

The solution to my problem that gets the Scenario Outlines working again when run by the CLI.

Replace:

stepRunner.runSteps(reporter, runtime);

with:

runSteps(reporter,runtime);

Unfortunately, I couldn't quite figure out what was wrong with #146 and we don't have a test in the spring backend to verify it, so I'm not exactly sure how to proceed with this. I know that commit breaks a Scenario Outline written using the JRuby Backend. I suspect that it is not JRubyBackend specific, since the commit touches Core and JUnit

Not using the stepRunner in this specific case has the stepRunner only being used by the JUnit backend, not the ScenarioOutline, nor the Scenario.

Test Code: I dropped this into the jruby backend's testing directory (so it'd get executed, and git wouldn't bother with it,) and started a git bisect at v1.0.0.RC11 (which was good) with HEAD being bad. I ended up at 41493c8

Feature File:

Feature: EPIC FAIL

  Scenario Outline: Do a scenario outline calling things
    Given I store the value "<value>"
    When I grab another value "<otherValue>"
    Then those values are the same
  Examples:
    | value   | otherValue |
    | 1       | 1          |
    | awesome | awesome    |

Step Definitions:


Given /^I store the value "([^"]*)"$/ do |value|
  @value = value
end

When /^I grab another value "([^"]*)"$/ do |value|
  @another_value = value
end

Then /^those values are the same$/ do
  assert_equal(@value, @another_value)
end

@aslakhellesoy made the commit, so I'm asking for another set of eyes before I just make the commit to fix Scenario Outlines. I'm reasonably confident it has to do with the context that format() is being called in. When called using stepRunner.runSteps() the formatted context is different than the other, and scenario outlines are broken.

@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

No branches or pull requests

2 participants