Rspec for thor script

Hello all,
I recently developed a CLI extending thor API.
While i was trying to write specs for thor’s tasks, I couldn’t find any
way to write the same for tasks with mandatory options or with options.
So can anyone please guide me for the same?