[Seaside] GRSlimeTest>>#run:do: question
Paul DeBruicker
pdebruic at gmail.com
Thu Jan 12 22:47:13 UTC 2012
I'm made some Amber specific portability Slime rules using the
Grease-Slime package as a model of how-to-do-it. They are here:
http://www.squeaksource.com/AmberSlime.
In GRSlimeTest>>#run:do: After the RBSmalllintChecker runs the composite
rule it checks the validity of the results by testing
rules
do: [ :each |
self
assert: (rule = each or: [ each result isEmpty and: [ each changes
isEmpty ] ])
description: each name , ' should not report errors' ].
In Amber there aren't globals so each reference to 'Smalltalk' must be
rewritten to 'Smalltalk current'. I've written two rules that address
this: #AMSmalltalkGlobalRule & #AMSmalltalkToSmalltalkCurrentRule.
#AMSmalltalkGlobalRule compiles a list of the #references: to #Smalltalk
and #AMSmalltalkToSmalltalkCurrentRule rewrites those references if the
subsequent message send is not #current.
When running the test suite the above bit of code in #run:do: causes the
tests for #AMSmalltalkToSmalltalkCurrentRule to fail because
#AMSmalltalkGlobalRule always has a result for the test as I've written it.
How can I rewrite the test for #AMSmalltalkToSmalltalkCurrentRule or
rule for #AMSmalltalkGlobalRule so that it doesn't raise an error when
testing another method?
I could always just remove the error checking mechanism.
Thanks in advance.
Paul
More information about the seaside
mailing list