Migration from RSpec 1.3 to RSpec 2.x

Vít Ondruch vondruch at redhat.com
Fri Nov 18 09:23:00 UTC 2011


Dne 17.11.2011 00:55, Shawn Starr napsal(a):
> On Wednesday, November 16, 2011 10:48:22 AM Vít Ondruch wrote:
>> Hello everybody,
>>
>> Here is updated list of Rawhide packages which still depends on RSpec 1.3:
>>
> <snip>
>
>> Vit
> Do we have a simple howto to convert to 2.0? Would make things easy for me to
> get my rubygems ready.
>
> Thanks,
> Shawn.
> _______________________________________________
> ruby-sig mailing list
> ruby-sig at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/ruby-sig

Hi Shawn,

No we don't, but I can throw a few points here, what I am typically doing.

1) Replace the BR: rubygem(rspec) => BR: rubygem(rspec-core). Typically 
I add above some comment like "# Use rspec-core until rspec are not 
migrated to RSpec 2.x" just to remember.
2) Use command "rspec spec/" in your check section. This typically 
replaces similar call for RSpec 1.x, which was "spec spec/"
3) Now you have to check that the test suite passes. If not, you have to 
make it compatible and submit patch upstream. Usually it is not required 
and it will just work. However sometime it needs more effort. Recent 
example might be rubygem-little-plugger [1]. You can see that the patch 
is very simple and was easily accepted by upstream.

Thats it. In the future, once all gems are RSpec 2.x ready, the 
rubygem-rspec package should be migrated from RSpec 1.x to RSpec 2.x and 
from that time, it will be possible to use again the rubygem(rspec) 
provider.


Vit


[1] https://bugzilla.redhat.com/show_bug.cgi?id=754355


More information about the ruby-sig mailing list