79532058

Date: 2025-03-24 20:20:22
Score: 2
Natty:
Report link

Using the binding.irb tool mentioned by @mechnicov, I was able to determine that instead of routing to the new method, I was getting an unauthorized viewer message. Turns out there was some legacy authorization code that I needed to account for in my tests.

Specifically, I added the pry gem to my Gemfile, updated the test to this:

describe 'GET #new' do
  it 'simplified test' do
    get :new
    binding.pry
    expect(assigns(:map_id)).to eq(1)
  end
end

Then I ran the test, and examined the response object (which is what this controller is for), then investigated its contents.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @mechnicov
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Dennis Christman