You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am looking for the "correct"/"right" way to simulate a file on a specific location. i currently go with predifined fixture files and thought about using the before and after hooks to create the file and delete it afterwards.
it would be nice having something like that:
Describe'example.sh'Data:/etc/example/example.conf#| my contentEndIt"should access the default config file /etc/example/example.conf if not otherwise specified"WhencallexampleThefile/etc/example/example.confshouldbereadTheoutputshouldequal"result"EndEnd
the file should be created before the call and afterwards be deleted but only in a kind of sandbox, so the real file should not be touched if it exists.
also it would be quite nice to have "And" in the DSL, like
It"should access the default config file /etc/example/example.conf if not otherwise specified"WhencallexampleThefile/etc/example/example.confshouldbereadAndtheoutputshouldequal"result"End
i would love having something like that in the DSL
HavingData:data1#| my contentEndIt"should access the default config file /etc/example/example.conf if not otherwise specified"Havingafileat/etc/example/example.comfwiththecontentdata1WhencallexampleThefile/etc/example/example.confshouldbereadAndtheoutputshouldequal"result"End
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i am looking for the "correct"/"right" way to simulate a file on a specific location. i currently go with predifined fixture files and thought about using the before and after hooks to create the file and delete it afterwards.
it would be nice having something like that:
the file should be created before the call and afterwards be deleted but only in a kind of sandbox, so the real file should not be touched if it exists.
also it would be quite nice to have "And" in the DSL, like
i would love having something like that in the DSL
Beta Was this translation helpful? Give feedback.
All reactions