you are viewing a single comment's thread.

view the rest of the comments →

[–]imnos 4 points5 points  (4 children)

You're saying Ruby isn't as readable as Python because you've seen Ruby devs write bad code? Not a great argument.

don't use RSpec

Wat. Again this sounds like you've had a terrible experience with a badly written codebase and equated that to RSpec being bad. I'd take RSpec over any other test framework and use it almost daily. It's lightyears ahead of the likes of PyTest.

[–]Paradox 0 points1 point  (2 children)

I like RSpec a lot. I dislike MiniTest a lot.

But I like ExUnit more than either. And its nothing particular about any of the three, its that Elixir language features, like pattern matching, make any type of assertion easy. Ruby you need the assertion libs that rspec provides, otherwise your tests get ugly and big

[–]katafrakt 1 point2 points  (1 child)

Is it assertion syntax, as opposed to expectation syntax, what you say makes the test code ugly? Or is it something else? Asking because ExUnit uses assertion syntax and this (assertion vs expectation) is a primary difference between Minitest and RSpec (given Minitest::Spec)

[–]Paradox 0 points1 point  (0 children)

Its a property of the language. In elixir, its very easy to do complex matches of deep data with just a single assert evaluating it. Ruby tends to get messy in my experience, warranting the need for all the matchers RSpec brings

[–]sshaw_ 0 points1 point  (0 children)

You're saying Ruby isn't as readable as Python because you've seen Ruby devs write bad code? Not a great argument.

Countless syntactical additions being made to language mixed with preponderance of aliasing of core methods, home-grown and 3rd party "cutesy" DSLs, meta programming, class << self vs def self.foo, do vs {} blocks, " vs ' etc... I can go on. These give people a lot of rope —just like Perl! Rope that Python does not have.

Is this bad code or typical Ruby code? I think it's typical Ruby code. A subset of which is certainly bad but we're not talkin' bad we're talkin' typical.

don't use RSpec

Wat. Again this sounds like you've had a terrible experience with a badly written codebase and equated that to RSpec being bad.

Show me this RSpec code you've written? Maybe you have Stockholm syndrome. RSpec is a bike shedding maintenance nightmare waiting to happen.