Skip to content

Commit

Permalink
Do not store #developmentEnvironmentEnabled setting
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey committed Aug 28, 2023
1 parent 6bd8e22 commit 12a48b1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PharoLauncher-Spec2/PhLDeploymentScript.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,12 @@ PhLDeploymentScript class >> settingsOn: aBuilder [
(aBuilder setting: #developmentEnvironmentEnabled)
parent: #pharoLauncher;
target: self;
default: false;
order: 60;
label: 'Enable development environment' translated;
label: 'Enable development environment';
description: 'Missing a feature? Hey come join in! Add your custom feature.
When enabled, exits the Launcher application into the Pharo development environment.
When disabled, closes all windows and locks Launcher as the only running application. ' translated.
When disabled, closes all windows and locks Launcher as the only running application. '.
]

{ #category : #public }
Expand Down
33 changes: 33 additions & 0 deletions src/PharoLauncher-Tests-Core/PhLSettingsTest.class.st
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)
]

0 comments on commit 12a48b1

Please sign in to comment.