[rspec-users] Problem with translator

aslak hellesoy aslak.hellesoy at gmail.com
Thu May 10 14:37:50 EDT 2007


On 5/10/07, Ed Howland <ed.howland at gmail.com> wrote:
> Hi,
>
> Just installed 0.9.4 (from 0.8 series) and ran the spec translator. It
> messed up specs that had the should include() where the argument to
> include is a string (using no parens for the arg)
>
> IOW, given:
> context "OldSchool" do
>   class OldSchool
>         attr_accessor collection
>         def initialize
>                 @collection = []
>         end
>         def add_new(item)
>                 @collection << item
>         end
>   end
>
>   specify "should include string with '?'" do
>         school = OldSchool.new
>         school.add_item 'like ?'
>         school.collection.should_include 'like ?'
>   end
> end
>
> The resulting translation is:
>
>  it "should include string with '?'" do
>         school = OldSchool.new
>         school.add_item 'like ?'
>         school.collection.should include('like)?'
>   end
>
> It works ok if the original line is parenthesized
> school.collection.should_include('like ?')
>

you can submit a patch or bug report, but we might not fix it. we're
not aiming for a 100% perfect translator - just in the upper nineties.

aslak

> Ed
>
>
>
>
>
>
> --
> Ed Howland
> http://greenprogrammer.blogspot.com
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list