Live data from Hacker News

Brut: A New Web Framework for Ruby

naildrivin5.com

51–60 of 88 posts

Re: Brut: A New Web Framework for Ruby

#52
post #22

Earlier quoted context omitted.

The biggest thing is the mocking system. MiniTest's feels so difficult to use. I also like creating custom matchers vs. creating my own assert_* methods. I would agree that many features of RSpec are, honestly, bad: shared examples, shared contexts, etc. Excessive use of let! and let, plus the predicate matchers are all just really confusing to me. I actually thought about patching the RSpec gem to remove the feature…

The mocking thing actually touches on another point of frustration for me. I think the design of Rails ends up causing people to reach for mocking way too often in order to test things. At a glance I think Brut should avoid a lot of this by having things just be plain old Ruby objects. I have dealt with countless Rails projects where testing things conventionally was difficult or impossible so mocks/stubs had to be u…

_in your opinion_

My opinion is, _my unit tests_ are to protect my code against unwanted changes. To that end, unit tests test a single unit. And everything is mocked. If I have to rewrite a method, usually I rewrite all of its unit tests. Which is fine. They’re easy to write or rewrite.

Fully mocked unit tests are then supplemented with fewer “full stack” tests higher up the pyramid.

Re: Brut: A New Web Framework for Ruby

#53
post #22

Earlier quoted context omitted.

The mocking thing actually touches on another point of frustration for me. I think the design of Rails ends up causing people to reach for mocking way too often in order to test things. At a glance I think Brut should avoid a lot of this by having things just be plain old Ruby objects. I have dealt with countless Rails projects where testing things conventionally was difficult or impossible so mocks/stubs had to be u…

_in your opinion_ My opinion is, _my unit tests_ are to protect my code against unwanted changes. To that end, unit tests test a single unit. And everything is mocked. If I have to rewrite a method, usually I rewrite all of its unit tests. Which is fine. They’re easy to write or rewrite. Fully mocked unit tests are then supplemented with fewer “full stack” tests higher up the pyramid.

> My opinion is, _my unit tests_ are to protect my code against unwanted changes.

This is just about the most bizarre take on unit testing I've seen in my 25-year career.

> If I have to rewrite a method, usually I rewrite all of its unit tests.

If you have to rewrite your tests every time you rewrite a method, you are entirely defeating the point of testing. What value you get from tests that only assert that the current implementation is equal to the current implementation?

Re: Brut: A New Web Framework for Ruby

#54
Wow, that's quite a license. [0][1] Before and after adopting, be sure to check on the pay practices for the janitorial workers of the companies who mined the raw materials for the machinery that made the components in your laptop…

[0] https://brutrb.com/overview.html#brut-is-hippocratic-license...

[1] https://firstdonoharm.dev/version/3/0/cl-eco-media-my-tal-xu...

Re: Brut: A New Web Framework for Ruby

#55
post #53

Earlier quoted context omitted.

_in your opinion_ My opinion is, _my unit tests_ are to protect my code against unwanted changes. To that end, unit tests test a single unit. And everything is mocked. If I have to rewrite a method, usually I rewrite all of its unit tests. Which is fine. They’re easy to write or rewrite. Fully mocked unit tests are then supplemented with fewer “full stack” tests higher up the pyramid.

> My opinion is, _my unit tests_ are to protect my code against unwanted changes. This is just about the most bizarre take on unit testing I've seen in my 25-year career. > If I have to rewrite a method, usually I rewrite all of its unit tests. If you have to rewrite your tests every time you rewrite a method, you are entirely defeating the point of testing. What value you get from tests that only assert that the cur…

> This is just about the most bizarre take on unit testing I've seen in my 25-year career.

Lol ok

> you are entirely defeating the point of testing

We will disagree here

> only assert that the current implementation is equal to the current implementation

I didn’t state that I do this

Re: Brut: A New Web Framework for Ruby

#56
post #54

Wow, that's quite a license. [0][1] Before and after adopting, be sure to check on the pay practices for the janitorial workers of the companies who mined the raw materials for the machinery that made the components in your laptop… [0] https://brutrb.com/overview.html#brut-is-hippocratic-license... [1] https://firstdonoharm.dev/version/3/0/cl-eco-media-my-tal-xu...

[deleted]

Re: Brut: A New Web Framework for Ruby

#57

> I know, we can vibe away all the boilerplate required for Rails apps. But how much fun is that? How much do you enjoy setting up RSpec, again, in your new Rails app? How tired are you of changing the “front end solution” every few years? And aren’t you just tired of debating where your business logic goes or if it’s OK to use HTTP DELETE (tunneled over a _method param in a POST) to archive a widget? For your person…

[dead]

Re: Brut: A New Web Framework for Ruby

#58
post #54

Wow, that's quite a license. [0][1] Before and after adopting, be sure to check on the pay practices for the janitorial workers of the companies who mined the raw materials for the machinery that made the components in your laptop… [0] https://brutrb.com/overview.html#brut-is-hippocratic-license... [1] https://firstdonoharm.dev/version/3/0/cl-eco-media-my-tal-xu...

I would love to live in a world where this license was possible for the average person to comply with, but I'm not even sure an above average person could.

Re: Brut: A New Web Framework for Ruby

#59
post #53

Earlier quoted context omitted.

_in your opinion_ My opinion is, _my unit tests_ are to protect my code against unwanted changes. To that end, unit tests test a single unit. And everything is mocked. If I have to rewrite a method, usually I rewrite all of its unit tests. Which is fine. They’re easy to write or rewrite. Fully mocked unit tests are then supplemented with fewer “full stack” tests higher up the pyramid.

> My opinion is, _my unit tests_ are to protect my code against unwanted changes. This is just about the most bizarre take on unit testing I've seen in my 25-year career. > If I have to rewrite a method, usually I rewrite all of its unit tests. If you have to rewrite your tests every time you rewrite a method, you are entirely defeating the point of testing. What value you get from tests that only assert that the cur…

You seem confused about what he was saying. I’m sure you are familiar with unit testing philosophy with your experience. Calling a function and expecting a response does test the behavior of the application, just at a lower level than a request- or multi-request level spec. When he says rewriting a method he is referring to changing the logic of it; a refactor leaves the tests unchanged. That shouldn’t have needed to be spelled out to such a senior developer.

Re: Brut: A New Web Framework for Ruby

#60
post #54

Wow, that's quite a license. [0][1] Before and after adopting, be sure to check on the pay practices for the janitorial workers of the companies who mined the raw materials for the machinery that made the components in your laptop… [0] https://brutrb.com/overview.html#brut-is-hippocratic-license... [1] https://firstdonoharm.dev/version/3/0/cl-eco-media-my-tal-xu...

[deleted]
Post reply on HN