105 files, 117 examples, 25 expectations, 0 failures, 100 errors
Generating specs that can't be made to pass is a bad idea for two reasons:
- It generates failures even on MRI, which is supposed to be what we're
specifying. A spec that can't be made to pass on any implementation is a
broken spec, and there's no way to make these examples pass.
- It requires tagging dozens of failures, which means that as those
examples are filled out they still won't be run until tags are updated
again. This masks both new successes and new valid failures.
I strongly recommend we do not generate specs that have hard failures in
them. If we want a mechanism by which we can track specs that haven't
been implemented, there should be another counter in mspec, or an
ability to pass no block and have it be recorded as an "example-less
spec" for fill-out purposes later. There could even be a "strict" mode
that generates errors for unimplemented specs, but they should never,
never fail by default on MRI.
- Charlie
no, mkspec should stay as-is, but `mspec ci` should filter those out.
This will let us easily track what we have left to work on.
bin/mspec -tr <some ruby 1.8 spec> should not fail, so I think the hard
failures should be removed.
- Charlie
I think the cause of this discussion is that there are two rather
different use cases for the rubyspecs. One is to use them as
(internal) tests driving the development, and another one is to use
them as a common/shared compatibility/conformance test suite for
multiple implementations.
Naturally, external users of the (compatibility) test suite expect
that the tests would at least fully pass on the reference
implementation, and any spec failures are the failures of the
implementation under test. Having failures for not written specs makes
little sense in this scenario.
Also, you're saying that 'mspec ci' would filter those out, but how?
Do you intend to keep/create/maintain exclude files for those
failures, and not only for rubinius, but for MRI as well? Do you
expect that all other Ruby implementors would have to maintain those
excludes and that shoul be done for every single implemenation out
there that decided to use rubyspecs? It seems that we're having hard
time trying to "lure" MRI folks to use rubyspecs as is, and it will be
only harder if they would need to struggle with exclusions for
non-implemented specs.
What's the point for this extra work for everybody? So that it's easy
to see which specs are not implemented? Well, it's easy to see right
now too. All the empty files that end with _spec.rb - are not
implemented specs. :)
Yet another point: The specs are written in rspec-compatible format
and it is expected that should be runnable by rspec. Rspec doesn't
have any excludes support at all.
Ideally, I'd like to see that mspec spec/file/blah.rb should always
pass on MRI 1.8.6, as well as rspec spec/file/blah.rb.
The ability to run MRI 100% clean on the specs is very valuable for
everybody, it seems.
Thanks,
--Vladimir
Strongly agree on both points. MRI is the reference implementation, and
it should always run green on the specs without any twiddling. And every
spec written should be confirmed to work on MRI **before** committing.
- Charlie
Why not just format the unimplemented description as
describe "Class#method" do
it "HAS NOT BEEN SPECIFIED" do
end
end
It would be pretty clear from mspec -fs which ones needed work.
- Charlie
On Sun, Apr 6, 2008 at 5:12 AM, Brian Ford <bri...@gmail.com> wrote:
> 1. provide a set of specs that passes 100% on the standard
> implementation.
> 2. provide a simple mechanism to signpost methods whose specs need
> additional attention.
> 3. provide a simple way to create template spec files.
>
> describe "Class#method" do
> it "needs to be reviewed for completeness" do
> flunk if whizbang
> end
> end
Looks like a great plan, and I'm all for it. As long as MRI passes on
specs with no failures and with no manual configurations - I'm good :)
There is one (minor and non-blocking) issue though. Adding those
template specs might significantly affect the stats of the test run,
and might confuse those who runy mspec with -f s option, since there
will be many specs printed out with wording that they incomplete. Is
there a way to do that "if whizbang" thing before actually defining
the spec? That way, those who don't currently care about incomplete
specs, won't notice them altogether, not in stats, not in the output,
etc.
Thanks,
--Vladimir