Rack: Move rack testing utilities inside the rack core code

Created on 14 Sep 2016  路  6Comments  路  Source: rack/rack

Is there are specific reason why there are no solution for easier testing the rack applications similar to Rack::Test, but inside this repository?

I can see the following pros:

  • better maintainability - rack-test is unmaintained for a one year already and not supports rack >= 2.0
  • better documentation - it could be documented well, as more people are contributing to the rack, so they can notice if the code of rack test is outdated much faster
  • popularity - at the moment you have to find out rack-test or similar gem by yourself, but if it will be embedded in this gem it will be much more easier to connect and start to test as everything will be in one package
  • version matching - test suite of rack going to test rack core as well rack test utils, so no more broken test utils

Most helpful comment

For reference, the outcome of this was that the project was moved to the rack organization a couple of months ago: https://github.com/rack/rack-test/issues/256#issuecomment-611151110

All 6 comments

These days rack-test looks maintained (last commit 6 hours ago) and supports current versions of rack. rack-test is well suited for testing rack applications and I use it all the time. I'm not sure how useful it is for testing rack itself, though.

The idea that rack-test would be documented better if included in rack implies rack is documented better than rack-test, and I'm not sure how true that is.

rack-test has over 200 million downloads, about 2/3 of rack's total downloads. I don't think popularity is an issue.

I think the current version of rack-test supports many versions of rack, and I don't think version matching will be a major issue going forward. I can commit to working with the rack-test developers to fix any issues caused by rack changes.

Closing as this isn't a bug in rack.

@jeremyevans thanks for answering on the topic question.

Just checked rack-test issues, and the first one I can see is this one: https://github.com/rack-test/rack-test/issues/256

Means it's almost unmaintained, and my question 4 years ago was because I found that rack-test at 2016 didn't worked well with the latest rack for some of the features it provided by then.

Regarding the documentation and the version matching: that's for sure more people will be involved in maintaining rack-test in case if it will be embedded inside the rack repository, or at least will be moved to the rack account and will be linked from the README file.

All the major projects, like sidekiq or actionpack has testing libs embedded along it's sourcecode and can be embedded when needed.

Would be really great to merge rack and rack-test together, because, as you have noticed, 2/3 of people are using it anyway, and others may need it at some point and could find it's already there, and they just need to require it from their spec's or unit-test's helper :smile:

Hi,

Chiming in as one of the (regretfully rather inactive) rack-test maintainers here.

Would be really great to merge rack and rack-test together, because, as you have noticed, 2/3 of people are using it anyway

I don't think this necessarily holds true. One of the major, major reasons why rack-test has so many downloads is because AFAIK it gets included by default when creating a new Rails project. I'm quite certain that we _do not_ have anywhere near ~200 million active users; if we did, the whole maintainer issue for rack-test would likely be a non-issue. We would have dozens of great programmers, documentation people, project managers etc lining up, just waiting to be assigned work... :smirk:

Having that said, I am not at all opposed to moving rack-test to the Rack organization, if @jeremyevans (hi again, btw :blush:) and/or other Rack maintainers would be interested in such a move. I get the feeling that this is not really the case though, but please let me know if this is an incorrect assumption.

@perlun Thank you and the other rack-test maintainers for your work on rack-test. I really like rack-test and use it for almost all of my acceptance testing. However, I personally do not see a need to move it to the rack organization. Other rack core team members may feel differently; I do not speak for them.

Note that rack already ships with testing tools in the form of Rack::MockRequest and Rack::MockResponse. rack doesn't use rack-test for testing its own internals (it uses Rack::MockRequest and Rack::MockResponse), so the comparison to sidekiq or actionpack as a reason to integrate rack-test into rack or move it to the rack organization doesn't make sense to me.

If you need help maintaining it then moving it to this org makes sense to me. Because we already have the structures and some people here to keep it moving forward. It鈥檚 likely coordinated changes will be required for Rack 3.0 and it鈥檚 also easier for discoverability. So I vote to move it to the rack org. But happy to hear from others.

For reference, the outcome of this was that the project was moved to the rack organization a couple of months ago: https://github.com/rack/rack-test/issues/256#issuecomment-611151110

Was this page helpful?
0 / 5 - 0 ratings