Vít Ondruch wrote on 11/28/2014 08:15 PM:
Dne 10.11.2014 v 14:59 Mamoru TASAKA napsal(a):
> - Or not, you can use BuildRequires(rspec2). Note that
> 2.x version rspec (script) is renamed to %_bindir/rspec2,
> you'll probably have to do
> $ rspec2 spec/
> for example.
Used the rspec2 command for the first time, I have strange feeling about
it. Shouldn't we provide also plain rspec command for rspec2?
Let me explain. When you install RSpec 2.x and RSpec 3.x side by side by
gem install, you'll get single rspec executable. You can later choose
which version you actually want to execute by something like "rspec
_2.2_".
And this won't work at all when rspec2 and rspec (3) is really
parallel installed:
[tasaka1@localhost rspec-expectations-2.14.5]$ rspec _2.14.8_ spec
Run options: include {:focused=>true}
All examples were filtered out; ignoring {:focused=>true}
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
(very long, rest cut out)
... And so current rspec2 "command" won't work either, in
this way.
This is because while rspec _2.14.8_ tries to use rspec-core with
that version, for rspec-expectations and rspec-mocks (used
internally) this does not apply.
So the correct way is to specify core, expectations, mocks all
versions to "~> 2.14.0" in /usr/bin/rspec2
(fixed in rubygem-rspec2-core-2.14.8-4.fc22), and we don't expect
that rspec _2.14.8_ really works.
So while I agree that rspec2 is a bit simpler than the previous
command, I'd say that the rspec command should be available as well,
since when only RSpec 2.x is available on your system, it is unexpected
to don't have the rspec command available, otherwise user experience is
broken IMO. Thoughts? I'll probably file bug later ...
Vít
Regards,
Mamoru