pharo
pharo copied to clipboard
Improve test of RBSplitClassMethod
This test checks that when spliitting a class, accesses to several of the moved instance variables are correctly handled.
RBSplitClassParametrizedTest >> testSplitClassHandleMethodAccessingTwoMovedInstanceVariables
|ref aModel|
ref := self createRefactoringWithArguments:
{ #RBBasicLintRuleTestData . #(#methodBlock #classBlock) . #BlockClass . #blocks }.
aModel := ref model.
self executeRefactoring: ref.
self assert: ((aModel classNamed: #RBBasicLintRuleTestData) parseTreeFor: #checkClassAccessingTheTwoInstanceVariables:)
equals: (self parseMethod: 'checkClassAccessingTheTwoInstanceVariables: aSmalllintContext
^blocks classBlock + blocks methodBlock value: aSmalllintContext value: result').
and we added
RBBasicLintRuleTestData >> checkClassAccessingTheTwoInstanceVariables: aSmalllintContext
^classBlock + methodBlock value: aSmalllintContext value: result
after adding that method to the test data classs,
RBSearchTest>>testAllSearches RBVariableTypeTest>>testBasicLintRuleTypes
are failing.