Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDenker committed Jul 12, 2020
1 parent 4285043 commit 62db97f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/GeneralRules-Tests/ReSmalllintTest.class.st
Expand Up @@ -219,6 +219,11 @@ ReSmalllintTest >> testAddRemoveDependents [
self classRuleFor: self currentSelector
]

{ #category : #tests }
ReSmalllintTest >> testAnySatisfy [
self ruleFor: self currentSelector
]

{ #category : #tests }
ReSmalllintTest >> testAsOrderedCollectionNotNeeded [
self ruleFor: self currentSelector
Expand Down Expand Up @@ -279,11 +284,6 @@ ReSmalllintTest >> testCollectionProtocol [
self ruleFor: self currentSelector
]

{ #category : #tests }
ReSmalllintTest >> testContains [
self ruleFor: self currentSelector
]

{ #category : #tests }
ReSmalllintTest >> testDefinesEqualNotHash [
self classRuleFor: self currentSelector
Expand Down
2 changes: 1 addition & 1 deletion src/GeneralRules/ReAnySatisfyRule.class.st
@@ -1,5 +1,5 @@
"
Checks for the common code fragment: ""(aCollection detect: [:each | ''some condition''] ifNone: [nil]) ~= nil"". contains: can simplify this code to ""aCollection anySatisfy: [:each | ''some condition'']"". Not only is the contains: variant shorter, it better signifies what the code is doing
Checks for the common code fragment: ""(aCollection detect: [:each | ''some condition''] ifNone: [nil]) ~= nil"". contains: can simplify this code to ""aCollection anySatisfy: [:each | ''some condition'']"". Not only is the anySatisfy: variant shorter, it better signifies what the code is doing.
"
Class {
#name : #ReAnySatisfyRule,
Expand Down
10 changes: 5 additions & 5 deletions src/Refactoring-Tests-Critics/RBSmalllintTestObject.class.st
Expand Up @@ -17,6 +17,11 @@ RBSmalllintTestObject >> abstractUnaryAccessingMethodWithoutReturn [
self subclassResponsibility
]

{ #category : #methods }
RBSmalllintTestObject >> anySatisfy [
^((1 to: 10) detect: [:each | each > 2] ifNone: [nil]) isNil
]

{ #category : #methods }
RBSmalllintTestObject >> asOrderedCollectionNotNeeded [
self foo addAll: (1 to: 10) asOrderedCollection
Expand Down Expand Up @@ -101,11 +106,6 @@ RBSmalllintTestObject >> consistencyCheck [
^(1 to: 10) size > 0
]

{ #category : #methods }
RBSmalllintTestObject >> contains [
^((1 to: 10) detect: [:each | each > 2] ifNone: [nil]) isNil
]

{ #category : #methods }
RBSmalllintTestObject >> debbuggingMessageSent [
self rearmOneShot
Expand Down

0 comments on commit 62db97f

Please sign in to comment.