Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scopes in PowerSlim #48

Open
akruglikov opened this issue Jul 3, 2013 · 2 comments
Open

Scopes in PowerSlim #48

akruglikov opened this issue Jul 3, 2013 · 2 comments

Comments

@akruglikov
Copy link

All variables in PowerSlim is global. If I create $x variable in one scenario, I can use it in other, in general script, everywhere.

Now, to avoid problems with unexpected value in $x-variable in script I call Remove-variable x in last line of scenario. It's not comfortably.

@konstantinvlasenko
Copy link
Owner

BTW: It is better to use pattern "Good setup don't need clean up". So I suggest just to set a variable to $null at the first line of your scenario.
Agree we should tackle with this issue. But the good thing is that we have the workaround (you mentioned).

@akruglikov
Copy link
Author

if I use $x in the test, when I execute some scenario with "local" variable $x, then I can see that $x in test - not exist or $null.
The pattern is not related with local variables, because the scenario doesn't equal the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants