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

False positives on CyberDojo #3

Open
aslakhellesoy opened this issue Dec 5, 2017 · 2 comments
Open

False positives on CyberDojo #3

aslakhellesoy opened this issue Dec 5, 2017 · 2 comments

Comments

@aslakhellesoy
Copy link
Contributor

http://cyber-dojo.cucumber.io/review/show/AA5C4F80AD?avatar=squid&was_tag=17&now_tag=17

The image isn't recognising certain errors as errors, so green is reported for both errors and undefined steps sometimes.

Anything to add @JonJagger?

@JonJagger
Copy link

Looking at the Shouty workbook in the section headed "Snippet generation"
There are two places where it tells you to

  1. put a pending step-definition in place
  2. put a [raise "bad step"] step-definition in place
    And it says both cases will cause the build to fail.
    And it does fail in the sense of the stdout you see.
    But the cyber-dojo regex gives you a green...

@sebrose
Copy link

sebrose commented Dec 5, 2017

The logic in use is contained in https://github.com/cyber-dojo-languages/ruby-cucumber/blob/master/docker/red_amber_green.rb

lambda { |stdout,stderr,status|
  output = stdout + stderr

  return :amber if /SyntaxError/.match(output)
  return :amber if /NameError/.match(output)
  return :amber if /^[.-UF]*U[.-UF]*$/.match(output)
  return :red if /^[.-UF]*F[.-UF]*$/.match(output)
  return :green
}

It sounds like we need to add P to the logic. In JS I alsoo had to add A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants