Class CLI < Thor desc "run [age]" "user passes age" method_option :age,type:'numeric' def run variable=options[:a] if options[:a].present? call_method(a) endend
How do I mock options[:a]
using Rspec if I want to test the following line?
variable=options[:a] if options[:a].present?
Also, how do I test whether the local variable is updated or not?