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

Failing tests / '==' returns true comparing digest to actual password #9

Open
BenBach opened this issue May 23, 2017 · 1 comment
Open

Comments

@BenBach
Copy link

BenBach commented May 23, 2017

Hi first of all thank you for taking the time to create an example as this

After cloning the repository I realised that 4 tests are failing.

  1) Error:
JwtIssuer::#encode#test_0001_returns a new jwt:
NameError: undefined local variable or method `be_nil' for #<#<Class:0x007f8ce6c6d700>:0x007f8ce6551318>
   spec/inventory/services/jwt_issuer_spec.rb:9:in `block (3 levels) in <top (required)>'

  2) Error:
JwtIssuer::#decode#test_0001_returns valid informations if the jwt is valid:
NoMethodError: undefined method `eq' for #<#<Class:0x007f8ce6c6d200>:0x007f8ce9080d90>
    spec/inventory/services/jwt_issuer_spec.rb:18:in `block (3 levels) in <top (required)>'

  3) Error:
JwtIssuer::#decode#test_0002_returns nil if jwt is not valid:
NameError: undefined local variable or method `be_nil' for #<#<Class:0x007f8ce6c6d200>:0x007f8ce907aee0>
    spec/inventory/services/jwt_issuer_spec.rb:24:in `block (3 levels) in <top (required)>'

  4) Error:
JwtIssuer::#decode#test_0003_returns nil if jwt is expired:
NameError: undefined local variable or method `be_nil' for #<#<Class:0x007f8ce6c6d200>:0x007f8ce907a9b8>
    /spec/inventory/services/jwt_issuer_spec.rb:31:in `block (3 levels) in <top (required)>'
@nickgnd
Copy link
Owner

nickgnd commented May 27, 2017

Hi @BenBach and thank you for taking the time to submit an issue :)

I'm a bit confused.
Reading the title of this issue seems you had a problem that concerns the password, but the stack trace highlights some weird errors related to JWT's tests, or better, to minitest gem (undefined local variable or method be_nil').

I'm not able to reproduce your error locally both with Ruby 2.3.0 and 2.3.1, all my tests are green.

❯ rake test
Run options: --seed 25790

# Running:

..............................................................

Finished in 0.864420s, 71.7244 runs/s, 93.7045 assertions/s.

62 runs, 81 assertions, 0 failures, 0 errors, 0 skips

❯ rake test TEST=spec/inventory/services/jwt_issuer_spec.rb
Run options: --seed 32275

# Running:

....

Finished in 0.002858s, 1399.3686 runs/s, 2099.0529 assertions/s.

4 runs, 6 assertions, 0 failures, 0 errors, 0 skips

❯ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

❯ hanami -v
v1.0.0

I really want to help you and understand what is the problem.
Are you able to reproduce this failing tests? Could you provide me more context:

  • ruby version
  • your Gemfile.lock
  • the seed of a failing test
  • Are the other tests green?
  • ...any other information that you think could be helpful

Thanks again :)

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

2 participants