ruby on rails - NoMethodError: undefined method `assert_block' -
apparently method exists , i've been trying utilize it, doesn't seem work in utilize case.
test "should appropriate autocomplete results upon ideal request" :index, { "term" => "al", "max_results" => "20"} assert_response :success assert_not_nil assigns(:payers) assert json_response.length <= 20 assert_block json_response.each |payer_hash| homecoming false unless payer_hash['label'][0..1] == "al" end true end end
that test. @ first thought using wrong because have block within of it. but, @ same time, if had within simple one-liner, utilize assert. using wrong? deprecated in rails 4.1? if so, new way this?
ruby-on-rails testing tdd
No comments:
Post a Comment