Skip to main content
13 events
when toggle format what by license comment
Jan 20, 2020 at 6:00 history tweeted twitter.com/StackSoftEng/status/1219137631843508224
Jan 14, 2020 at 0:57 comment added bdsl oh right, I'd assumed that public? would always return true or false. I don't know Ruby idioms well enough to know if that's a reasonable assumption for typical code.
Jan 14, 2020 at 0:16 comment added preferred_anon @bdsl A lot of this depends on the language, but I'm imagining that if an unset value is accessed then an exception is thrown (I'm imagining this because I originally was using instance doubles, which will throw exceptions if they receive an unexpected message). I suppose if these are object attributes then you'll get nil and that might do something sensible. But it's not intended behaviour.
Jan 13, 2020 at 22:14 comment added bdsl How would the first test you suggested fail when you rearrange into the "file-first" implementation?
Jan 13, 2020 at 21:50 review Close votes
Jan 20, 2020 at 3:05
Jan 13, 2020 at 21:27 answer added Theraot timeline score: 3
Jan 13, 2020 at 20:49 comment added preferred_anon @Theraot I think that if I was going to take the randomised approach here, then I would just enumerate every possiblity. You could argue that using randomness rather than exhausting the possiblities keeps your test suite light, but you lose the "all green = OK" part and I don't think it's worth the trade.
Jan 13, 2020 at 20:19 answer added Ewan timeline score: 11
Jan 13, 2020 at 20:15 history edited preferred_anon CC BY-SA 4.0
added 168 characters in body
Jan 13, 2020 at 20:14 comment added preferred_anon Typically a mock will either raise an error or return a falsy value when it receives an unexpected message, so unless I misunderstand you, I don't think so.
Jan 13, 2020 at 20:13 comment added πάντα ῥεῖ Isn't that what mocks are for?
Jan 13, 2020 at 20:10 review First posts
Jan 14, 2020 at 13:45
Jan 13, 2020 at 20:09 history asked preferred_anon CC BY-SA 4.0