Using memory_store at test environment
Fix rspec test for global_spec.rb and refactor