How dare you test a private method
29-Sep-2023 626
I feel inspired to talk more about “testing a private method” (gasp!). Since people seem to get upset about it.Where did this idea of it being bad even come from? I remember when learning to code it was all over the place. Blog posts, books, podcasts.I remember being asked it as a trick question in interviews: "which code should you test?". Then the interviewer would nod as soon as I'd say "the public methods, never private!", to signal we have read the same blog posts.
How dare you test a private method #ruby #rubydeveloper #rubyonrails #private #method #test https://rubyonrails.ba/link/how-dare-you-test-a-private-method