Use let function in spec file