Viewing profile — radanskoric
radanskoric
HN member- Joined
- Thu, Jan 29, 2015, 9:48 AM UTC
- HN karma
- 96
- Public activity
- 57 items
- HN profile
- View on Hacker News ↗
About radanskoric
Recent public activity
-
comment
Comment #46209331
Author here. I didn't mention it because I wasn't writing an evaluation of fixtures. Just writing about how to make better use of fixtures. I actually use both fixtures and factori…
-
comment
Comment #46209273
It's required for tests to clean up after themselves. With Rails and fixtures this is handled by default: each test runs inside a transaction which is rolled back at the end of the…
-
comment
Comment #46209249
I'm with you on the one assertion per test. I bundled two assertions into the same test here because my whole point was to have them effectively together describe a single test, ju…
-
comment
Comment #46209144
Ah, ok, now I understand. Ok, I wasn't talking about that. From what I understand about property based testing it's sort of half way between regular example based testing and forma…
-
comment
Comment #46205637
Ah, Ok, yes, for API endpoints it makes a lot of sense. Especially if it's a public API, you need to inspect the output anyway, to ensure that the public contract is not broken. Bu…
-
comment
Comment #46205604
Author here. Yes, what you describe sound where much like what I call Factories (and that's what they're usually called in Ruby land, and some other languages). The problem arises …
-
comment
Comment #46205456
I think I'm getting what you mean and I almost completely agree with you, let me address one part, the only part where I don't agree: > Plus you do gain testing power, because you …
-
comment
Comment #46205355
I'm familiar with snapshot testing for UI and I agree with you, they can work really well for this because they're usually quick to verify. And especially if you can build in some …
-
comment
Comment #46205327
When you say inheritance do you mean DRY as in "Don't repeat yourself"? I'm not sure what you mean by inheritance in tests but DRY is criminally overused in tests. That could be a …
-
comment
Comment #46205297
In theory you're 100% right, a true unit test is completely isolated from the rest of the system and than a lot of the problems disappear. In reality, that is also not free. It imp…
-
comment
Comment #46205223
Your thinking is sound. At the end of the day Rails default fixtures is nothing more than some code that reads yaml files and creates records once at the start of test suite run. S…
-
comment
Comment #46204850
Author here. I'm a big fan of factories but the slowness is a real drag on large test suites. If you're considering switching, remember that you can do it gradually, there's no law…
-
comment
Comment #46204819
Author here. Thanks for writing up your thoughts on this! The "doesn't include non-active projects objections is easy", please check the Example 1 test again, there's a line for th…
-
comment
Comment #46204661
Author here, thanks for posting. :)
-
comment
Comment #45858386
Woah, this thread escalated quickly.
-
comment
Comment #45857212
Can you explain why you say they would be better off? What else would be a better choice and why?
-
comment
Comment #45856687
Have you used it over the last few years? It has it been rapidly improving, mainly because Shopify put a team full time on it. It doesn’t take a lot of people to optimize a VM/inte…
-
comment
Comment #44022173
It's a sharp knife. You can create a messy nightmare or a clean super readable codebase, it's up to how good the author is.
-
comment
Comment #44016597
No worries, I didn't think that's the case. :) It's an interesting conversation.
-
comment
Comment #44014469
That was my misunderstanding as well. That's why I wrote the article. Btw, it's not even about the RubyLLM gem. The gem abstracts away the calling of various LLM providers and give…
-
comment
Comment #44014426
Interesting. I've not used it but this sounds like the tools that were exposed to it need improvement. Everything you describe seems like it should be mostly in reach of current la…
-
comment
Comment #44014408
Yes, exactly, Ruby has the human readability expressiveness. If you say that expressivity is the ability to implement a program in less lines of code then Ruby is more expressive t…
-
comment
Comment #44014385
It's good that you commented. I see more than a few people are getting caught up on the number of lines so it's good that I clarify.
-
comment
Comment #44014115
Why are people always the reason why we can't have nice things... :D
-
comment
Comment #44014108
That's a very neat idea, maybe even add something like browser-use to allow it to implement a Rails app and try it out automatically. I think you should try it. :) I'm being seriou…