How can i access global variables for writing unit test cases for my plugins

I am writing unit test cases for my jekyll plugins , I need to access the global varaibles so that they can be passed to individual functions.
How to access them from outside of jekyll build process?
Thank you.