[rspec-users] ANN: RSpec 0.9.0 beta-1 available for download.

David Chelimsky dchelimsky at gmail.com
Thu Apr 5 14:45:06 EDT 2007


On 4/5/07, Wincent Colaiuta <win at wincent.com> wrote:
> El 4/4/2007, a las 18:33, aslak hellesoy escribió:
>
> > In order to ease the transition from 0.8 to 0.9, we have included a
> > tool to translate your 0.8 style specs to 0.9 style.
>
> The included translator did a pretty good job on a fairly large
> project ("svn diff" on the working copy after the translation yielded
> over 3,000 lines of diffs) with only a few minor issues for which
> I'll paste in samples. (Tried to post this to the RubyForge issue
> tracker but I can't stay logged in long enough to open the ticket
> because of an invisible anonymous proxy in place thanks to my ISP...)
>
>
> Whitespace between specs and comments eaten:
>
> -      lambda { @instance.foo = foo }.should_raise NoMethodError # no
> writer defined
> +      lambda { @instance.foo = foo }.should raise_error
> (NoMethodError)# no writer defined
>
>
> Incorrect parentheses around method invocations with parameters:
>
> -        AndPredicate.new('foo').should_eql AndPredicate.new('foo')
> +        AndPredicate.new('foo').should eql(AndPredicate.new)('foo')
>
>
> Unnecessary parens:
>
> -        Node.subclass('FooNode').should_not_be_nil
> +        Node.subclass('FooNode').should_not be_nil()
>
>
> Missing parentheses, yields "parenthesize argument(s) for future
> version" warnings when running specs:
>
> -        lambda { sequence.parse
> ('bar') }.should_throw :ZeroWidthParseSuccess
> +        lambda { sequence.parse('bar') }.should
> throw_symbol :ZeroWidthParseSuccess
>
>
> Another example:
>
> -        @parslet.should_eql @parslet.clone
> +        @parslet.should eql @parslet.clone
>
>
> Another case of misplaced parens:
>
> -        @parslet.should_not_eql lambda { nil }.to_parseable
> +        @parslet.should_not eql(lambda){ nil }.to_parseable
>
>
> Another:
>
> -        results.should_be_kind_of SimpleASTLanguage::Identifier
> +        results.should be_kind_of(SimpleASTLanguage)::Identifier
>
>
> Apart from that, no major issues. All specs continued to pass after
> 0.90, and the updated TextMate bundle works brilliantly.
>
> Cheers,
> Wincent

Great feedback - thank you Wincent. I've added this to the tracker:

http://rubyforge.org/tracker/index.php?func=detail&aid=9882&group_id=797&atid=3149

Cheers,
David

>
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list