_why and experts - Bluebie, Hugh, MenTaLguY,
Thank you for the useful and interesting discussion about this topic.
I'll report them to the course students of RubyLearning.org.
'#!shoes' and '%x(ruby thingy.rb)' are so cool!
I'll take the tips into my Shoes Tutorial note. :)
Thanks again,
ashbb
On Fri, Oct 3, 2008 at 12:57 AM, Hugh Sasse <[EMAIL PROTECTED]> wrote:
> On Fri, 3 Oct 2008, Satoshi Asakawa wrote:
>
> [...]
> > @all,
> [...]
> > Is it possible to add the unit testing functonality as the following to
> > Shoes?
> >
> > - Make it possible to start a Shoes app from Ruby. (Without having to
> type
> > "Shoes my_app.rb"; just "ruby my_app.rb") As long as that is not
> possible,
>
> I do this all the time:
>
> <example>
> #!shoes
>
> Shoes.app do
> para("Boo!")
> end
> __END__
> </example>
>
> That example file has #!shoes on its first line. It will be a .rb script.
> Shells will see it has a #! line and pass it to shoes.
> Windows will see it has a .rb extension, pass it to ruby, which will see
> the #! line and pass it to shoes. I double click on shoes apps and ruby
> apps alike as a result of this. The only problem is that the icons for
> a shoes app show up as being ruby apps. Which may not be a problem.
>
> Now, from within Ruby code you could %x(thingy.rb) and this would get
> interpreted by the shell and thus end up being run by shoes.
>
>
> > you can't really startup a Shoes app from the inside of a unit test. (You
> > could call a Shoes app with the backticks, but then you wouldn't have a
> > reference to the app object, I think.)
>
> If it is in a separate process. But you should be able to put unit tests
> inside the shoes app, the difficulty is getting the namespacing right.
> >
> > How about this idea? Is it possible or impossible?
> >
> > Regards,
> > ashbb
> >
> >
> Hugh
>