Skip to content

Commit

Permalink
Fix #12 - Default Label Enhancements
Browse files Browse the repository at this point in the history
- Avoid Nil Test
- Pass Description as Argument to Accessor
- Add test for default/auto labels
  • Loading branch information
seandenigris authored and noha committed Aug 13, 2018
1 parent 0112312 commit 2a607e9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
defaultLabelFor: aDescription
^ aDescription class defaultLabel
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
acessing-magritte
defaultLabel
^ self accessor defaultLabel ifNil: [ self class defaultLabel ]
^ self accessor defaultLabelFor: self
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
defaultLabel
defaultLabelFor: aDescription
^ self readSelector normalizeCamelCase capitalized
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tests-accessing
testDefaultLabel
self assert: self description label = ''.
self description accessor: #foo.
self assert: self description label = 'Foo'

0 comments on commit 2a607e9

Please sign in to comment.