Claudio Maccari
2009-Feb-07 17:02 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Good morning, I would try to test my .net code using a BDD approach. I believe Ruby has a clean syntax and great libraries to do BDD so I would use one them on IronRuby. Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090207/b637cd64/attachment.html>
Ivan Porto Carrero
2009-Feb-07 17:14 UTC
[Ironruby-core] test .net code with ruby BDD libraries
http://msdn.microsoft.com/en-us/magazine/dd434651.aspx --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Sat, Feb 7, 2009 at 6:02 PM, Claudio Maccari <claudio.maccari at gmail.com>wrote:> Good morning, > > > > I would try to test my .net code using a BDD approach. > > I believe Ruby has a clean syntax and great libraries to do BDD so I would > use one them on IronRuby. > > Has someone already try to test .net code with ruby DBB library? > > If the answer is yes, is there somewhere a sample/post/article of this > work? > > > > Many thanks in advance > > Claudio > > > > > > Claudio Maccari > > http://testdrivendevelopment.wordpress.com/ > > > > "I have the simplest taste. I am always satisfied with the best"- Oscar > Wilde > > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090207/267a1b24/attachment.html>
Thibaut Barrère
2009-Feb-07 18:10 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Hi,> Has someone already try to test .net code with ruby DBB library? > > If the answer is yes, is there somewhere a sample/post/article of this > work? > > Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) andTest::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut> > > Many thanks in advance > > Claudio > > > > > > Claudio Maccari > > http://testdrivendevelopment.wordpress.com/ > > > > "I have the simplest taste. I am always satisfied with the best"- Oscar > Wilde > > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090207/28445c2f/attachment.html>
Claudio Maccari
2009-Feb-07 19:35 UTC
[Ironruby-core] test .net code with ruby BDD libraries
It?s exactly what I?m looking for Thanks Claudio ps. Thanks again for coming at ALT.NET conf! From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: sabato 7 febbraio 2009 18.15 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries http://msdn.microsoft.com/en-us/magazine/dd434651.aspx --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Sat, Feb 7, 2009 at 6:02 PM, Claudio Maccari <claudio.maccari at gmail.com> wrote: Good morning, I would try to test my .net code using a BDD approach. I believe Ruby has a clean syntax and great libraries to do BDD so I would use one them on IronRuby. Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090207/24d79dee/attachment.html>
Curtis Mitchell
2009-Feb-07 20:07 UTC
[Ironruby-core] test .net code with ruby BDD libraries
I posted a way of testing .net code with ruby a few months back. It incorporates autotest also. http://www.curtismitchell.com/2b/?p=15 Sent from my mobile -----Original Message----- From: Ivan Porto Carrero <ivan at flanders.co.nz> Date: Sat, 7 Feb 2009 18:14:52 To: <ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Jimmy Schementi
2009-Feb-07 20:14 UTC
[Ironruby-core] test .net code with ruby BDD libraries
I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html However, don''t expect any mocking libraries to work. You can''t mock C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ~js ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi, Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090207/ec3fd811/attachment.html>
Claudio Maccari
2009-Feb-08 17:22 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Hi Jimmy, I would try bacon cause it looks simple but I can?t get it working. I installed bacon using gem and now is located in C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 I edited my ir.exe.config file as follow <options> <set language="Ruby" option="LibraryPaths" value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\l ib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" /> </options> But I get this error C:\Projects\IronRuby>ir.exe IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''bacon''IronRuby.Libraries:0:in `require'': no such file to load -- bacon (LoadError) from :0>>>What''s wrong ? Thanks Claudio From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: sabato 7 febbraio 2009 21.14 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverli ght.html However, don''t expect any mocking libraries to work. You can''t mock C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ~js _____ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi, Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090208/23b3438d/attachment-0001.html>
Ivan Porto Carrero
2009-Feb-08 17:49 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Hi Claudio try this: require ''rubygems'' require ''bacon'' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari <claudio.maccari at gmail.com>wrote:> Hi Jimmy, > > > > I would try bacon cause it looks simple but I can''t get it working. > > I installed bacon using gem and now is located in > C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 > > I edited my ir.exe.config file as follow > > > > <options> > > <set language="Ruby" option="LibraryPaths" > value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" > /> > > </options> > > > > But I get this error > > > > C:\Projects\IronRuby>ir.exe > > IronRuby 1.0.0.0 on .NET 2.0.50727.3053 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > >>> require ''bacon'' > > IronRuby.Libraries:0:in `require'': no such file to load -- bacon > (LoadError) > > from :0 > > > > >>> > > > > What''s wrong ? > > Thanks > > Claudio > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Jimmy Schementi > *Sent:* sabato 7 febbraio 2009 21.14 > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# > Silverlight code, and it works great on the desktop as well. It''s definitely > the smallest of the bdd libraries, and feels fastest, but I''ve got no data > to support that (yet). > > > > > http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html > > > > However, don''t expect any mocking libraries to work. You can''t mock C# > types, and have those changes be visible to other C# code. We need to write > a ruby wrapper around existing C# mocking libraries, so let me know if > anyone is interested in doing so. > > > > ~js > > > ------------------------------ > > *From:* ironruby-core-bounces at rubyforge.org [ > ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [ > thibaut.barrere at gmail.com] > *Sent:* Saturday, February 07, 2009 10:10 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > Hi, > > Has someone already try to test .net code with ruby DBB library? > > If the answer is yes, is there somewhere a sample/post/article of this > work? > > Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) > and Test::Unit (can be BDD too) did the trick. > > > > Check out this for a few hints and thoughts: > http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing > > > > cheers, > > > > -- Thibaut > > > > Many thanks in advance > > Claudio > > > > > > Claudio Maccari > > http://testdrivendevelopment.wordpress.com/ > > > > "I have the simplest taste. I am always satisfied with the best"- Oscar > Wilde > > > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090208/5e79f648/attachment.html>
Claudio Maccari
2009-Feb-09 09:05 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Hi Ivan, now I get this error L C:\Projects\IronRuby>ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig (LoadError) from :0 from IronRuby.Libraries:0:in `require'' from :0>>>Thanks Claudio From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: domenica 8 febbraio 2009 18.50 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi Claudio try this: require ''rubygems'' require ''bacon'' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari <claudio.maccari at gmail.com> wrote: Hi Jimmy, I would try bacon cause it looks simple but I can''t get it working. I installed bacon using gem and now is located in C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 I edited my ir.exe.config file as follow <options> <set language="Ruby" option="LibraryPaths" value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" /> </options> But I get this error C:\Projects\IronRuby>ir.exe IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''bacon''IronRuby.Libraries:0:in `require'': no such file to load -- bacon (LoadError) from :0>>>What''s wrong ? Thanks Claudio From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: sabato 7 febbraio 2009 21.14 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html However, don''t expect any mocking libraries to work. You can''t mock C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ~js _____ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi, Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090209/24e4e7dd/attachment-0001.html>
Stefan Dobrev
2009-Feb-09 19:32 UTC
[Ironruby-core] test .net code with ruby BDD libraries
You can just require the file with its full path. In your case:>>> require ''C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb''2009/2/9 Claudio Maccari <claudio.maccari at gmail.com>> Hi Ivan, > > now I get this error L > > > > C:\Projects\IronRuby>ir > > IronRuby 1.0.0.0 on .NET 2.0.50727.3053 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > >>> require ''rubygems'' > > IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig > (LoadError) > > from :0 > > from IronRuby.Libraries:0:in `require'' > > from :0 > > > > >>> > > > > Thanks > > Claudio > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* domenica 8 febbraio 2009 18.50 > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > Hi Claudio > > try this: > > require ''rubygems'' > require ''bacon'' > > > > On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari < > claudio.maccari at gmail.com> wrote: > > Hi Jimmy, > > > > I would try bacon cause it looks simple but I can''t get it working. > > I installed bacon using gem and now is located in > C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 > > I edited my ir.exe.config file as follow > > > > <options> > > <set language="Ruby" option="LibraryPaths" > value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" > /> > > </options> > > > > But I get this error > > > > C:\Projects\IronRuby>ir.exe > > IronRuby 1.0.0.0 on .NET 2.0.50727.3053 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > >>> require ''bacon'' > > IronRuby.Libraries:0:in `require'': no such file to load -- bacon > (LoadError) > > from :0 > > > > >>> > > > > What''s wrong ? > > Thanks > > Claudio > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Jimmy Schementi > *Sent:* sabato 7 febbraio 2009 21.14 > > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# > Silverlight code, and it works great on the desktop as well. It''s definitely > the smallest of the bdd libraries, and feels fastest, but I''ve got no data > to support that (yet). > > > > > http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html > > > > However, don''t expect any mocking libraries to work. You can''t mock C# > types, and have those changes be visible to other C# code. We need to write > a ruby wrapper around existing C# mocking libraries, so let me know if > anyone is interested in doing so. > > > > ~js > > > ------------------------------ > > *From:* ironruby-core-bounces at rubyforge.org [ > ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [ > thibaut.barrere at gmail.com] > *Sent:* Saturday, February 07, 2009 10:10 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > Hi, > > Has someone already try to test .net code with ruby DBB library? > > If the answer is yes, is there somewhere a sample/post/article of this > work? > > Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) > and Test::Unit (can be BDD too) did the trick. > > > > Check out this for a few hints and thoughts: > http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing > > > > cheers, > > > > -- Thibaut > > > > Many thanks in advance > > Claudio > > > > > > Claudio Maccari > > http://testdrivendevelopment.wordpress.com/ > > > > "I have the simplest taste. I am always satisfied with the best"- Oscar > Wilde > > > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090209/20a739f1/attachment.html>
Claudio Maccari
2009-Feb-09 21:19 UTC
[Ironruby-core] test .net code with ruby BDD libraries
This works but I would understand why require ?bacon? does not. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: luned? 9 febbraio 2009 20.32 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries You can just require the file with its full path. In your case:>>> require ''C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb''2009/2/9 Claudio Maccari <claudio.maccari at gmail.com> Hi Ivan, now I get this error L C:\Projects\IronRuby>ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig (LoadError) from :0 from IronRuby.Libraries:0:in `require'' from :0>>>Thanks Claudio From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: domenica 8 febbraio 2009 18.50 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi Claudio try this: require ''rubygems'' require ''bacon'' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari <claudio.maccari at gmail.com> wrote: Hi Jimmy, I would try bacon cause it looks simple but I can''t get it working. I installed bacon using gem and now is located in C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 I edited my ir.exe.config file as follow <options> <set language="Ruby" option="LibraryPaths" value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\l ib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" /> </options> But I get this error C:\Projects\IronRuby>ir.exe IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''bacon''IronRuby.Libraries:0:in `require'': no such file to load -- bacon (LoadError) from :0>>>What''s wrong ? Thanks Claudio From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: sabato 7 febbraio 2009 21.14 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverli ght.html However, don''t expect any mocking libraries to work. You can''t mock C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ~js _____ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi, Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090209/6090a606/attachment-0001.html>
Jimmy Schementi
2009-Feb-09 21:56 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Sounds like rubygems isn''t working correctly on your setup of IronRuby. It''s complaining about not finding rbconfig, which gems needs to load. It doesn''t have anything to do with bacon, so for now avoid loading it as a gem. We don''t have good documentation about how to get gems working in custom build of IronRuby, but that''s something I''ll be adding shortly. Ivan has gone down the path of getting this set up already, so maybe he can give you some pointers. Ivan? ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Claudio Maccari Sent: Monday, February 09, 2009 1:19 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries This works but I would understand why require ''bacon'' does not. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: luned? 9 febbraio 2009 20.32 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries You can just require the file with its full path. In your case:>>> require ''C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb''2009/2/9 Claudio Maccari <claudio.maccari at gmail.com<mailto:claudio.maccari at gmail.com>> Hi Ivan, now I get this error :( C:\Projects\IronRuby>ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig (LoadError) from :0 from IronRuby.Libraries:0:in `require'' from :0>>>Thanks Claudio From: ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org>] On Behalf Of Ivan Porto Carrero Sent: domenica 8 febbraio 2009 18.50 To: ironruby-core at rubyforge.org<mailto:ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi Claudio try this: require ''rubygems'' require ''bacon'' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari <claudio.maccari at gmail.com<mailto:claudio.maccari at gmail.com>> wrote: Hi Jimmy, I would try bacon cause it looks simple but I can''t get it working. I installed bacon using gem and now is located in C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 I edited my ir.exe.config file as follow <options> <set language="Ruby" option="LibraryPaths" value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" /> </options> But I get this error C:\Projects\IronRuby>ir.exe IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''bacon''IronRuby.Libraries:0:in `require'': no such file to load -- bacon (LoadError) from :0>>>What''s wrong ? Thanks Claudio From: ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org>] On Behalf Of Jimmy Schementi Sent: sabato 7 febbraio 2009 21.14 To: ironruby-core at rubyforge.org<mailto:ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html However, don''t expect any mocking libraries to work. You can''t mock C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ~js ________________________________ From: ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org> [ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org>] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com<mailto:thibaut.barrere at gmail.com>] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org<mailto:ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi, Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090209/04493797/attachment-0001.html>
Ivan Porto Carrero
2009-Feb-10 07:41 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Hi Claudio What I did was the following: I cloned ironruby from git then i build it using rake I use this .cmd file in the git root folder which is C:\tools\ironruby in my case @ECHO OFF cd merlin/main/Languages/Ruby ECHO "compiling debug version" rake compile cd ../../../.. ECHO "All done" I then change the line in ir.exe.config that sets the paths to read like this: <set language="Ruby" option="LibraryPaths" value="..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8" /> I also added the path C:\tools\ironruby\Merlin\Main\Languages\Ruby\Scripts to the PATH variable (that gives you access to igem, irake etc.) That should get ironruby gems to work you can test it by doing igem --version or igem env At this point rubygems seems to be broken in ironruby I get an error + C:\Users\Ivan Porto Carrero ? igem install bacon -V --backtrace --debug HEAD 200 OK: http://gems.rubyforge.org/latest_specs.4.8 GET 200 OK: http://gems.rubyforge.org/quick/Marshal.4.8/bacon-1.1.0.gemspec.rz ERROR: While executing gem ... (TypeError) allocator undefined for Zlib::Inflate c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Zlib\zlib.cs:517:in `inflate'' rubygems.rb:395:in `inflate'' spec_fetcher.rb:77:in `fetch_spec'' spec_fetcher.rb:64:in `fetch'' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each'' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\Enumerable.cs:88:in `map'' spec_fetcher.rb:61:in `fetch'' dependency_installer.rb:75:in `find_gems_with_sources'' dependency_installer.rb:162:in `find_spec_by_name_and_version'' dependency_installer.rb:206:in `install'' install_command.rb:70:in `execute'' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each'' install_command.rb:45:in `execute'' command.rb:129:in `invoke'' command_manager.rb:86:in `process_args'' command_manager.rb:74:in `run'' gem_runner.rb:25:in `run'' :0 so to make bacon work you install it with MRI. Then you can copy the folder bacon-1.1.0 from the folders gems, doc, specification in C:\ruby\lib\ruby\gems\1.8 to the folders gems, doc, specification in C:\tools\ironruby\merlin\external\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8 When I did that I could do: + C:\Users\Ivan Porto Carrero ? ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''=> true>>> require ''bacon''=> true On Mon, Feb 9, 2009 at 10:56 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote:> Sounds like rubygems isn''t working correctly on your setup of IronRuby. > It''s complaining about not finding rbconfig, which gems needs to load. It > doesn''t have anything to do with bacon, so for now avoid loading it as a > gem. > > > > We don''t have good documentation about how to get gems working in custom > build of IronRuby, but that''s something I''ll be adding shortly. Ivan has > gone down the path of getting this set up already, so maybe he can give you > some pointers. Ivan? > > > > ~js > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Claudio Maccari > *Sent:* Monday, February 09, 2009 1:19 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > This works but I would understand why require ''bacon'' does not. > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Stefan Dobrev > *Sent:* luned? 9 febbraio 2009 20.32 > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > You can just require the file with its full path. > > In your case: > > > > >>> require ''C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb'' > > > > 2009/2/9 Claudio Maccari <claudio.maccari at gmail.com> > > Hi Ivan, > > now I get this error L > > > > C:\Projects\IronRuby>ir > > IronRuby 1.0.0.0 on .NET 2.0.50727.3053 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > >>> require ''rubygems'' > > IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig > (LoadError) > > from :0 > > from IronRuby.Libraries:0:in `require'' > > from :0 > > > > >>> > > > > Thanks > > Claudio > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* domenica 8 febbraio 2009 18.50 > > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > Hi Claudio > > try this: > > require ''rubygems'' > require ''bacon'' > > On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari < > claudio.maccari at gmail.com> wrote: > > Hi Jimmy, > > > > I would try bacon cause it looks simple but I can''t get it working. > > I installed bacon using gem and now is located in > C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 > > I edited my ir.exe.config file as follow > > > > <options> > > <set language="Ruby" option="LibraryPaths" > value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" > /> > > </options> > > > > But I get this error > > > > C:\Projects\IronRuby>ir.exe > > IronRuby 1.0.0.0 on .NET 2.0.50727.3053 > > Copyright (c) Microsoft Corporation. All rights reserved. > > > > >>> require ''bacon'' > > IronRuby.Libraries:0:in `require'': no such file to load -- bacon > (LoadError) > > from :0 > > > > >>> > > > > What''s wrong ? > > Thanks > > Claudio > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Jimmy Schementi > *Sent:* sabato 7 febbraio 2009 21.14 > > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > > > I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# > Silverlight code, and it works great on the desktop as well. It''s definitely > the smallest of the bdd libraries, and feels fastest, but I''ve got no data > to support that (yet). > > > > > http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html > > > > However, don''t expect any mocking libraries to work. You can''t mock C# > types, and have those changes be visible to other C# code. We need to write > a ruby wrapper around existing C# mocking libraries, so let me know if > anyone is interested in doing so. > > > > ~js > > > ------------------------------ > > *From:* ironruby-core-bounces at rubyforge.org [ > ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [ > thibaut.barrere at gmail.com] > *Sent:* Saturday, February 07, 2009 10:10 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries > > Hi, > > Has someone already try to test .net code with ruby DBB library? > > If the answer is yes, is there somewhere a sample/post/article of this > work? > > Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) > and Test::Unit (can be BDD too) did the trick. > > > > Check out this for a few hints and thoughts: > http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing > > > > cheers, > > > > -- Thibaut > > > > Many thanks in advance > > Claudio > > > > > > Claudio Maccari > > http://testdrivendevelopment.wordpress.com/ > > > > "I have the simplest taste. I am always satisfied with the best"- Oscar > Wilde > > > > > > > > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090210/49bfa53f/attachment-0001.html>
Unnikrishnan Nair
2009-Feb-10 13:49 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Hi Ivan, It is a very good documentation of what we have now. I have been playing with Ironruby and becon couldn''t make it work. I am going to give it a try with your suggestion. Thanks for the help. --- On Tue, 2/10/09, Ivan Porto Carrero <ivan at flanders.co.nz> wrote: From: Ivan Porto Carrero <ivan at flanders.co.nz> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries To: ironruby-core at rubyforge.org Date: Tuesday, February 10, 2009, 1:41 AM Hi Claudio What I did was the following: I cloned ironruby from git then i build it using rake I use this .cmd file in the git root folder which is C:\tools\ironruby in my case @ECHO OFF cd merlin/main/Languages/Ruby ECHO "compiling debug version" rake compile cd ../../../.. ECHO "All done" I then change the line in ir.exe.config that sets the paths to read like this: <set language="Ruby" option="LibraryPaths" value="..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8" /> I also added the path C:\tools\ironruby\Merlin\Main\Languages\Ruby\Scripts to the PATH variable (that gives you access to igem, irake etc.) That should get ironruby gems to work you can test it by doing igem --version or igem env At this point rubygems seems to be broken in ironruby I get an error + C:\Users\Ivan Porto Carrero ? igem install bacon -V --backtrace --debug HEAD 200 OK: http://gems.rubyforge.org/latest_specs.4.8 GET 200 OK: http://gems.rubyforge.org/quick/Marshal.4.8/bacon-1.1.0.gemspec.rz ERROR:? While executing gem ... (TypeError) ??? allocator undefined for Zlib::Inflate ??????? c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Zlib\zlib.cs:517:in `inflate'' ??????? rubygems.rb:395:in `inflate'' ??????? spec_fetcher.rb:77:in `fetch_spec'' ??????? spec_fetcher.rb:64:in `fetch'' ??????? c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each'' ??????? c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\Enumerable.cs:88:in `map'' ??????? spec_fetcher.rb:61:in `fetch'' ??????? dependency_installer.rb:75:in `find_gems_with_sources'' ??????? dependency_installer.rb:162:in `find_spec_by_name_and_version'' ??????? dependency_installer.rb:206:in `install'' ??????? install_command.rb:70:in `execute'' ??????? c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each'' ??????? install_command.rb:45:in `execute'' ??????? command.rb:129:in `invoke'' ??????? command_manager.rb:86:in `process_args'' ??????? command_manager.rb:74:in `run'' ??????? gem_runner.rb:25:in `run'' ??????? :0 so to make bacon work you install it with MRI. Then you can copy the folder bacon-1.1.0 from the folders gems, doc, specification in C:\ruby\lib\ruby\gems\1.8 to the folders gems, doc, specification in C:\tools\ironruby\merlin\external\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8 When I did that I could do: + C:\Users\Ivan Porto Carrero ? ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''=> true>>> require ''bacon''=> true On Mon, Feb 9, 2009 at 10:56 PM, Jimmy Schementi <Jimmy.Schementi at microsoft.com> wrote: Sounds like rubygems isn''t working correctly on your setup of IronRuby. It''s complaining about not finding rbconfig, which gems needs to load. It doesn''t have anything to do with bacon, so for now avoid loading it as a gem. ? We don''t have good documentation about how to get gems working in custom build of IronRuby, but that''s something I''ll be adding shortly. Ivan has gone down the path of getting this set up already, so maybe he can give you some pointers. Ivan? ? ~js ? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Claudio Maccari Sent: Monday, February 09, 2009 1:19 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries ? This works but I would understand why require ''bacon'' does not. ? ? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Stefan Dobrev Sent: luned? 9 febbraio 2009 20.32 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries ? You can just require the file with its full path.? In your case: ?>>>require ''C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb'' ? 2009/2/9 Claudio Maccari <claudio.maccari at gmail.com> Hi Ivan, now I get this error L ? C:\Projects\IronRuby>ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. ?>>>require ''rubygems'' IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig (LoadError) ??????? from :0 ??????? from IronRuby.Libraries:0:in `require'' ??????? from :0 ?>>>?? Thanks Claudio ? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: domenica 8 febbraio 2009 18.50 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries ? Hi Claudio try this: require ''rubygems'' require ''bacon'' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari <claudio.maccari at gmail.com> wrote: Hi Jimmy, ? I would try bacon cause it looks simple but I can''t get it working. I installed bacon using gem and now is located in C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 I edited my ir.exe.config file as follow ? <options> ????? <set language="Ruby" option="LibraryPaths" value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" /> ??? </options> ? But I get this error ? C:\Projects\IronRuby>ir.exe IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. ?>>>require ''bacon'' IronRuby.Libraries:0:in `require'': no such file to load -- bacon (LoadError) ??????? from :0 ?>>>?? What''s? wrong ? Thanks Claudio ? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: sabato 7 febbraio 2009 21.14 To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries ? I''ve using bacon (http://github.com/chneukirchen/bacon)?to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). ? http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html ? However, don''t expect any mocking libraries to work. You can''t mock?C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ? ~js ? From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi,? Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. ? Check out this for a few hints and thoughts:?http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing ? cheers, ? -- Thibaut ? Many thanks in advance Claudio ? ? Claudio Maccari http://testdrivendevelopment.wordpress.com/ ? "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde ? ? ? ? ? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -----Inline Attachment Follows----- _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090210/6ded892c/attachment-0001.html>
Jimmy Schementi
2009-Feb-10 22:06 UTC
[Ironruby-core] test .net code with ruby BDD libraries
Yep, igem install doesn''t work currently, Tomas said he''d look at it. In the meantime: ? Add c:\path\to\ironruby\Merlin\Main\Languages\Ruby\Scripts\Bin to your PATH ? Point rubygems at c:\path\to\ruby-1.8.6\lib\ruby\gems (rather than ironruby\gems) by changing c:\path\to\ruby1.8.6\lib\ruby\site_ruby\1.8\rubygems\defaults.rb#15 to: File.join ConfigMap[:libdir], ''ruby'', ''gems'', Then "igem list --local" will show the same gems that "gem list --local" sees. So for now, install gems with "gem", but you can then use them from IronRuby. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Unnikrishnan Nair Sent: Tuesday, February 10, 2009 5:50 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi Ivan, It is a very good documentation of what we have now. I have been playing with Ironruby and becon couldn''t make it work. I am going to give it a try with your suggestion. Thanks for the help. --- On Tue, 2/10/09, Ivan Porto Carrero <ivan at flanders.co.nz> wrote: From: Ivan Porto Carrero <ivan at flanders.co.nz> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries To: ironruby-core at rubyforge.org Date: Tuesday, February 10, 2009, 1:41 AM Hi Claudio What I did was the following: I cloned ironruby from git then i build it using rake I use this .cmd file in the git root folder which is C:\tools\ironruby in my case @ECHO OFF cd merlin/main/Languages/Ruby ECHO "compiling debug version" rake compile cd ../../../.. ECHO "All done" I then change the line in ir.exe.config that sets the paths to read like this: <set language="Ruby" option="LibraryPaths" value="..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8" /> I also added the path C:\tools\ironruby\Merlin\Main\Languages\Ruby\Scripts to the PATH variable (that gives you access to igem, irake etc.) That should get ironruby gems to work you can test it by doing igem --version or igem env At this point rubygems seems to be broken in ironruby I get an error + C:\Users\Ivan Porto Carrero ? igem install bacon -V --backtrace --debug HEAD 200 OK: http://gems.rubyforge.org/latest_specs.4.8 GET 200 OK: http://gems.rubyforge.org/quick/Marshal.4.8/bacon-1.1.0.gemspec.rz ERROR: While executing gem ... (TypeError) allocator undefined for Zlib::Inflate c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Zlib\zlib.cs:517:in `inflate'' rubygems.rb:395:in `inflate'' spec_fetcher.rb:77:in `fetch_spec'' spec_fetcher.rb:64:in `fetch'' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each'' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\Enumerable.cs:88:in `map'' spec_fetcher.rb:61:in `fetch'' dependency_installer.rb:75:in `find_gems_with_sources'' dependency_installer.rb:162:in `find_spec_by_name_and_version'' dependency_installer.rb:206:in `install'' install_command.rb:70:in `execute'' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each'' install_command.rb:45:in `execute'' command.rb:129:in `invoke'' command_manager.rb:86:in `process_args'' command_manager.rb:74:in `run'' gem_runner.rb:25:in `run'' :0 so to make bacon work you install it with MRI. Then you can copy the folder bacon-1.1.0 from the folders gems, doc, specification in C:\ruby\lib\ruby\gems\1.8 to the folders gems, doc, specification in C:\tools\ironruby\merlin\external\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8 When I did that I could do: + C:\Users\Ivan Porto Carrero ? ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''=> true>>> require ''bacon''=> true On Mon, Feb 9, 2009 at 10:56 PM, Jimmy Schementi <Jimmy.Schementi at microsoft.com</mc/compose?to=Jimmy.Schementi at microsoft.com>> wrote: Sounds like rubygems isn''t working correctly on your setup of IronRuby. It''s complaining about not finding rbconfig, which gems needs to load. It doesn''t have anything to do with bacon, so for now avoid loading it as a gem. We don''t have good documentation about how to get gems working in custom build of IronRuby, but that''s something I''ll be adding shortly. Ivan has gone down the path of getting this set up already, so maybe he can give you some pointers. Ivan? ~js From: ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org>] On Behalf Of Claudio Maccari Sent: Monday, February 09, 2009 1:19 PM To: ironruby-core at rubyforge.org</mc/compose?to=ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries This works but I would understand why require ''bacon'' does not. From: ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org>] On Behalf Of Stefan Dobrev Sent: luned? 9 febbraio 2009 20.32 To: ironruby-core at rubyforge.org</mc/compose?to=ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries You can just require the file with its full path. In your case:>>> require ''C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb''2009/2/9 Claudio Maccari <claudio.maccari at gmail.com</mc/compose?to=claudio.maccari at gmail.com>> Hi Ivan, now I get this error :( C:\Projects\IronRuby>ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''rubygems''IronRuby.Libraries:0:in `require'': no such file to load -- rbconfig (LoadError) from :0 from IronRuby.Libraries:0:in `require'' from :0>>>Thanks Claudio From: ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org>] On Behalf Of Ivan Porto Carrero Sent: domenica 8 febbraio 2009 18.50 To: ironruby-core at rubyforge.org</mc/compose?to=ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi Claudio try this: require ''rubygems'' require ''bacon'' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari <claudio.maccari at gmail.com</mc/compose?to=claudio.maccari at gmail.com>> wrote: Hi Jimmy, I would try bacon cause it looks simple but I can''t get it working. I installed bacon using gem and now is located in C:\ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0 I edited my ir.exe.config file as follow <options> <set language="Ruby" option="LibraryPaths" value="c:\ruby\lib\ruby\site_ruby\1.8\;c:\ruby\lib\ruby\site_ruby\;c:\ruby\lib\ruby\1.8\;c:\ruby\lib\ruby\gems\1.8\gems\" /> </options> But I get this error C:\Projects\IronRuby>ir.exe IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved.>>> require ''bacon''IronRuby.Libraries:0:in `require'': no such file to load -- bacon (LoadError) from :0>>>What''s wrong ? Thanks Claudio From: ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org>] On Behalf Of Jimmy Schementi Sent: sabato 7 febbraio 2009 21.14 To: ironruby-core at rubyforge.org</mc/compose?to=ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries I''ve using bacon (http://github.com/chneukirchen/bacon) to test C# Silverlight code, and it works great on the desktop as well. It''s definitely the smallest of the bdd libraries, and feels fastest, but I''ve got no data to support that (yet). http://blog.jimmy.schementi.com/2009/01/dynamic-language-testing-in-silverlight.html However, don''t expect any mocking libraries to work. You can''t mock C# types, and have those changes be visible to other C# code. We need to write a ruby wrapper around existing C# mocking libraries, so let me know if anyone is interested in doing so. ~js ________________________________ From: ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org> [ironruby-core-bounces at rubyforge.org</mc/compose?to=ironruby-core-bounces at rubyforge.org>] On Behalf Of Thibaut Barr?re [thibaut.barrere at gmail.com</mc/compose?to=thibaut.barrere at gmail.com>] Sent: Saturday, February 07, 2009 10:10 AM To: ironruby-core at rubyforge.org</mc/compose?to=ironruby-core at rubyforge.org> Subject: Re: [Ironruby-core] test .net code with ruby BDD libraries Hi, Has someone already try to test .net code with ruby DBB library? If the answer is yes, is there somewhere a sample/post/article of this work? Did not use RSpec yet (as it was reported to be slow), but MSpec (BDD) and Test::Unit (can be BDD too) did the trick. Check out this for a few hints and thoughts: http://blog.logeek.fr/2008/12/1/thoughts-on-ironruby-and-dotnet-testing cheers, -- Thibaut Many thanks in advance Claudio Claudio Maccari http://testdrivendevelopment.wordpress.com/ "I have the simplest taste. I am always satisfied with the best"- Oscar Wilde _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org</mc/compose?to=Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org</mc/compose?to=Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org</mc/compose?to=Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org</mc/compose?to=Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -----Inline Attachment Follows----- _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org</mc/compose?to=Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090210/a00c4ad7/attachment-0001.html>