janko / rodauth-rails

Rails integration for Rodauth authentication framework
https://github.com/jeremyevans/rodauth
MIT License
571 stars 40 forks source link

Add: rspec fixtures #127

Closed benkoshy closed 2 years ago

benkoshy commented 2 years ago
benkoshy commented 2 years ago

The culprit was a missing comma!

The only thing remaining is to correctly stub the Rails.config object and to test for that. if you have a pointer on how to efficiently do this (just the general idea will more than suffice - to save you time etc.) pls LMK and I can finish off the rest..

janko commented 2 years ago

I don't think the RSpec branch is worth testing, I would just not test it. I also skipped tests for disabled fixtures, because I didn't want to deal with global mutable state that is config.generators.

benkoshy commented 2 years ago

In that case I will manual check that it works as expected, and will squash.

incidentally, I was unable to debug and step through code in the main library. was wondering how you are managing that.

janko commented 2 years ago

incidentally, I was unable to debug and step through code in the main library. was wondering how you are managing that.

I'm almost never doing this, for me stopping at a single point with binding.irb is sufficient in most cases. I often get lost when I'm stepping.

benkoshy commented 2 years ago

I manually tested for spec using the rodauth-rails generator - looks good:

image

It is finished. We are the champions.

we_are_the_champions

janko commented 2 years ago

The changes look good now, the only thing that remains is removing the unrelated whitespce changes, as those make git blame more difficult to use.

benkoshy commented 2 years ago

Should be ready now. Apologies, I made some mistakes.

Thank you for your umpteen and magnanimous patience.