Issue #13156 has been updated by Benoit Daloze.


Akira Tanaka wrote:
> I recommend test-all over rubyspec because
> it is difficult to change developer's behavior.
> I.e. it is difficult to force CRuby committers to write new tests for new features in rubyspec.

I do not want to force anybody, just encourage writing new tests under spec/rubyspec for developers willing to try it.

> If I remember correctly, jruby already uses test-all.
> So, it is possible to use test-all for ruby implementations other than CRuby.
> test-all may have room to improvement for other implementations, though.

Yes, it is possible, and test-all is also used to some degree in TruffleRuby,
but I can tell you from experience it is painful to work with it.
(excluding is manual and excludes many assertions at a time for a single one failing,
figuring what is the intended behavior of the test is really hard and time consuming, etc)
Some of these issues can be improved, but I think overall, without an explicit support for "documentation of intended behavior",
it will remain obscure what behavior some assertions are testing.
It also seems to me the test/unit style encourages testing many things at once,
which is quite in opposition with the specs style and progressively implementing a feature.

Nevertheless, test-all is very useful for improving coverage
and we should aim to make it easier for other implementations to reuse it.
But if we can write some new tests in ruby/spec,
I believe it will always be superior for other implementations and for documentation.

----------------------------------------
Feature #13156: In-tree copy of ruby/spec
https://bugs.ruby-lang.org/issues/13156#change-63101

* Author: Benoit Daloze
* Status: Feedback
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Target version: 
----------------------------------------
I would like to integrate an in-tree copy of ruby/spec under spec/rubyspec/
(at the same location ruby/spec is currently cloned to ease transition).
This way, implementation and tests can be changed in a single commit, just like with MRI tests.
I will keep synchronizing the changes to ruby/spec, so it can be used
directly and other people can contribute there.
I know this synchronization works because I have been doing it for over 2 years.
This process is also well documented:
https://github.com/ruby/spec/wiki/Merging-specs-from-JRuby-and-other-sources

My main motivation is the current status is suboptimal as
ruby/spec is a different repository and there are synchronization problems.
For example, if a change happens on MRI trunk and it needs to adapt
ruby/spec, it will pass either ruby/ruby CI or ruby/spec CI but never both.
I want to fix this and I want to encourage CRuby developers to write specs.

If you want more details, please look at my ruby-core post:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/78633

Please state you opinion, I would like to integrate this soon.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>