-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not store #developmentEnvironmentEnabled setting
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Class { | ||
#name : #PhLSettingsTest, | ||
#superclass : #TestCase, | ||
#category : #'PharoLauncher-Tests-Core' | ||
} | ||
|
||
{ #category : #utility } | ||
PhLSettingsTest >> beDeployedDuring: aBlock [ | ||
|
||
PhLDeploymentScript isDeployed ifTrue: [ ^ self ]. | ||
|
||
PhLDeploymentScript makeDeployed. | ||
[ aBlock value ] | ||
ensure: [ PhLDeploymentScript makeUndeployed ] | ||
] | ||
|
||
{ #category : #tests } | ||
PhLSettingsTest >> testDevelopmentEnvironmentEnabledSettingIsNotStored [ | ||
|
||
| settingsFile settingNodes persistence | | ||
|
||
settingsFile := (FileSystem memory root / 'settings.txt') ensureCreateFile. | ||
|
||
settingNodes := (PhLSettingBrowser forKeywords: #( #pharoLauncherSettings )) | ||
treeHolder nodeList. | ||
persistence := SystemSettingsPersistence new | ||
fileReference: settingsFile; | ||
yourself. | ||
|
||
self beDeployedDuring: [ persistence storeSettingNodes: settingNodes ]. | ||
|
||
self deny: (settingsFile contents includesSubstring: #developmentEnvironmentEnabled) | ||
] |