This is a continuation of--
Rspec. Is 302 a success? Why 302?
Setting up the relevant code
In config/routes.rb I have
In spec/controllers/sql_statements_controller_spec.rb I have
In app/controllers/sql_statements_controller.rb I hav
p_here2 is debugging code I find extremely useful
Let's focus on app/controllers/sql_statements_controller.rb. The line to focus on is
With the line above in, I see this when I run rspec
If I comment out
I see this:
So, I think it is fairly clear Pundit is causing the 302.
I am a novice in both Pundit and Rspec
Question 1: Why is Pundit causing this "problem"?
Question 2: What is the preferred way to have Rspec go green on the test in spec/controllers/sql_statements_controller_spec.rb ?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/561435a7-caa2-4056-89d6-6b2015e94d68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
|Free forum by Nabble||Edit this page|