Looks great, only a few notes: * Ruby version guards inlince in the example are not allowed. You should always use the version guard and in its block define the example outlining the specific behaviour on that version. This means some examples will have to broken up into smaller ones. * To check for a method, use the have_method matchers. Unfortunately, there's no have_private_method matcher yet, so one should be added to MSpec, which is very straightforward. You can do so in our frozen copy, which I will then merge upstream later on. Or you can do it directly against MSpec, which might be easier as you can safely run the specs of MSpec without worrying about MacRuby hacks. Cheers, Eloy On Aug 2, 2009, at 9:17 PM, Matt Aimonetti wrote:
Done, would you mind checking that I did it according to the rubyspec standards?
Thanks,
- Matt
On Sun, Aug 2, 2009 at 11:30 AM, Matt Aimonetti <mattaimonetti@gmail.com
wrote: Thanks for the tip, I'll go back and fix strscan and will make the modifications before pushing stringio.
- Matt
On Sun, Aug 2, 2009 at 11:22 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote: Thanks Matt :)
Indeed, in order to specify the API changes between 1.8 and 1.9 you should use version guards:
ruby_version_is "" ... "1.9" do it "works as such on all versions prior to 1.9" do end end
ruby_version_is "1.9" do it "works as such on 1.9" do end end
To guard against compile errors you should use the language_version guard. See the rubyspec wiki for more info.
The 1.9.x specs should target HEAD. There's no specific 1.9 target yet set for either RubySpec or MacRuby.
HTH, Eloy
On 2 aug 2009, at 19:49, Matt Aimonetti wrote:
Hi Eloy,
Welcome back. Unfortunatelly, due to API changes, the specs can't all pass on 1.8 and 1.9 unless we use a version check mechanism.
My understanding was that we should focus on 1.9.2 preview 1.
What do you want me to do?
- Matt
Sent from my iPhone
On Aug 2, 2009, at 6:42, Eloy Duran <eloy.de.enige@gmail.com> wrote:
Hi,
I'm un-jet lagging a bit, so I thought I'd update the ruby specs again. We are now passing: 18160 examples.
@Matt: Great work on the StringScanner! Could you please make sure the specs run on 1.8 as well? Currently 4 fail:
$ mspec -B ruby.1.8.mspec library/stringscanner
StringScanner#getch is multi-byte character sensitive FAILED StringScanner#getch should keep the encoding ERROR StringScanner#initialize_copy is a private method FAILED StringScanner#initialize is a private method FAILED
@Laurent: There were quite some changes to complex that you might want to look into since you recently worked on those :)
Cheers, Eloy _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel