refactored of rspec code for better rspec 

fix the should to expect use let use <b>match_array</b> instead of<b> ==</b> use <b>be_nil</b> instead of nil also use <b>expect block</b> instead of <b>lamda block</b>