your ‘Sum’ class should be stored in a file named ‘summarizer.rb’
your ‘TestSummarizer’ class should be stored in another file, perhaps
named ‘test_summarizer.rb’.
I looked briefly in the tutorial and it seems like they don’t mention
that ‘Sum’ should go to ‘summarizer.rb’… Maybe it would be a good idea
to add it to the tutorial ?
···
On Thu, 05 Jun 2003 15:03:39 +0000, Richard wrote:
I added the environment variable RUBYLIB as you advised me. I added:
RUBYLIB=I:\Program Files\Ruby\lib\ruby\site_ruby\1.6
to my system, which facilitated the search for
require ‘runit\testcase’
That definition seemed excessively detailed compared to my RUBYPATH
definition
RUBYPATH=I:\Program Files\Ruby
so I reduced it to
RUBYLIB=I:\Program Files\Ruby\lib
in a subsequent project and that seemed to work fine. I trust you
agree that this is the appropriate RUBYLIB definition.
Question: Can multiple libraries be concatenated in the RUBYPATH
definition. If so, what is the delimiter to be used on a Win2000Pro
platform? Semicolon or colon?
Unit Testing
I couldn’t get the test example to work, despite your generous help.
(I’m a Ruby newbie.) So I found a simpler example from Hal Fulton at http://rubyhacker.com/domo.html
Based on that, I wrote the following:
require “test/unit”
class Sample
def initialize
end
def to_s
%q[Hi, I'm "Sample"]
end
end
class Tester < Test::Unit::TestCase
def test001
sample = Sample.new
puts sample
end
end
This produced the following output (when running under SciTe on
Win2000Pro):
Question: This output is a distortion from the output obtained when
running the script in a Command window. It looks like SciTe treats
the output from the script proper via “puts” distinctly from output
from the “unit” package, so that they are presented out of order in
the output pane.
I’m happy to have Unit Tesing working, but I’d like to know the
details about SciTe so that I interpret output from future usage
correctly.
I’m just a testing newbie, but i think that no output should be produced from automatic tests. That’s not XP way i guess. All tests must be done via
assertions.
kick me if i’m wrong
···
On Sunday 08 June 2003 07:32, Richard wrote:
Question: This output is a distortion from the output obtained when
running the script in a Command window. It looks like SciTe treats
the output from the script proper via “puts” distinctly from output
from the “unit” package, so that they are presented out of order in
the output pane.
I’m happy to have Unit Tesing working, but I’d like to know the
details about SciTe so that I interpret output from future usage
correctly.
hi list.
i am very new to ruby. mostly i develop in php oop. but the image library
sucks in php and php is dam slow.
i am working on a private project were i send huge amount of data discribing
mainly polygons in svg format from a web client. this need to get written to
jpeg format on the server site. i saw some great examples of ruby using
packages for writing images. but i am pretty lost in the world of ruby.
can anybody give me a hint where to look to get me on the right train?
would be very nice and finally would get me into ruby more.
thanx
niels
Question: This output is a distortion from the output obtained when
running the script in a Command window. It looks like SciTe treats
the output from the script proper via “puts” distinctly from output
from the “unit” package, so that they are presented out of order in
the output pane.
I’m just a testing newbie, but i think that no output should be produced
from automatic tests. That’s not XP way i guess. All tests must be done via
assertions.
The “XP way” does not specify the innards of the *Unit lineage of test rigs.
For historical (or possibly hysterical) reasons, those test rigs bunch up
the diagnoses from the assertions, and reveal them at the end.
I personally feel this is Big Test Up Front territory, and against the
ideals of TDD.
Specifically, TDD is completely interactive. The test rig is a programmer’s
interface.
I may want to say assert(x); exit(0), run the tests only to that point, but
still read the diagnostics.
I’m happy to have Unit Tesing working, but I’d like to know the
details about SciTe so that I interpret output from future usage
correctly.
Done right ( there’s no reason to say assert(x); exit(0). One should
only have a few diagnostics at a time, related to ones most recent edit.
Because TDD so often leads to doing things right, this hysterical feature
isn’t generally regarded as a problem.
I won’t “kick you” even though, IMHO, you’re wrong :-). The output
Hi, I’m “Sample”
Loaded suite UnitTestExample2
Started…
…
Finished in 0.01 seconds.
1 runs, 0 assertions, 0 failures, 0 errors
Only the first of the lines was from my test code. The rest were from
the unit test environment itself. The problem is that running the
same test in a Command window produces an inconsistent result: the “Hi
…” line is displayed immediately after the “Started …” line rather
than in the first position.
ncftp /ftp > pwd ftp://ftp.xprogramming.com/ftp/
ncftp /ftp > ls -al
drwx—r-x 2 system System 0 Aug 30 16:18 .
drwx—r-x 2 system System 0 Aug 30 16:18 …
-rwx—r-x 1 system System 29755 Jul 6 2000 Optional+scope+contracts.pdf
-rwx—r-x 1 system System 47104 Sep 13 2001 Release Results.doc
-rwx—r-x 1 system System 24064 Sep 13 2001 Release Results.xls
drwx—r-x 2 system System 0 Jul 3 21:12 TestingFramework
-rwx—r-x 1 system System 289792 Sep 17 2001 User Stories and Planning Game XPI.ppt
-rwx—r-x 1 system System 560640 Sep 11 2000 XP 2000 Slides.ppt
drwx—r-x 2 system System 0 Oct 25 2000 _vti_cnf
ncftp /ftp >
and unfortunately I cannot see neither *.zip nor *.pdf version.
However, I’ll appreciate to become enlightened to see them.
Of, course I’d not complain to receive one in my Inbox
Sorry, my reply was a bit hasty. I clicked on the link in your email and it
worked. Obviously, I didn’t read/retain what you were asking. I’ve been
Googling and haven’t been able to find anything either.
ImageMagick supports the SVG 1.0 PATH element. You can also translate
other SVG elements into Ruby method calls. You can use the RMagick
extension to call ImageMagick from Ruby scripts. See http://home.nc.rr.com/rmagick for examples.
Email me if you want details.
···
On Tue, 10 Jun 2003 00:55:50 +0900, niels wolf wrote:
hi list.
i am very new to ruby. mostly i develop in php oop. but the image
library sucks in php and php is dam slow.
i am working on a private project were i send huge amount of data
discribing mainly polygons in svg format from a web client. this need to
get written to jpeg format on the server site. i saw some great examples
of ruby using packages for writing images. but i am pretty lost in the
world of ruby. can anybody give me a hint where to look to get me on the
right train? would be very nice and finally would get me into ruby more.
thanx
niels
-I./… -I./…/missing -c -Tc./…/process.c
process.c
./…/process.c(48) : fatal error C1083: Cannot open include file:
‘grp.h’: No such file or directory
You could try searching your disk for files containing HAVE_GETGRENT;
(in either -D option or #define).
One is ext\etc.c
#ifdef HAVE_GETGRENT #include <grp.h> #endif
but I don’t see Ruby config defining this anywhere.
HAVE_GETGRENT is not defined. The problem is not with etc.c but with
process.c that unconditionally includes grp.h. I’ve tried to put #ifdef HAVE_GETGRENT around grp.h in process.c but then I have link
errors:
I missed this unconditional include because it’s been added since
15 May and Andy’s build was from around then.
Could you manage with sources prior to 06 Jun and compile from them ?
CVS is probably magical enough to allow that, or there’s
If you want it WinZipped, give me an OK by email and
I’ll have it ready.
Cheers,
daz
···
----- Original Message -----
From: “Yura” yura@opmr.com
Newsgroups: comp.lang.ruby
Sent: Sunday, June 08, 2003 7:03 AM
Subject: Re: Building ruby under Windows
Thanks, this one compiles, but it is 1.6.8 and I wanted 1.8.0
···
-----Original Message-----
From: daz [mailto:dooby@d10.karoo.co.uk]
Sent: June 8, 2003 03:34
To: ruby-talk ML
Subject: Re: Building ruby under Windows
I fear you’ve hit ‘work in progress’.
I missed this unconditional include because it’s been added since
15 May and Andy’s build was from around then.
Could you manage with sources prior to 06 Jun and compile from them ?
CVS is probably magical enough to allow that, or there’s