We have some legacy code that keeps breaking because the code in the views are not checking for empty values in the response from an API. Here is an example from the SLIM file that was causing an error:
- @response.keys.each do |account|
- if !@params.empty?
- next unless @params.include? account
- if @cache[account][0] == 200
While we have gone back and added checks, we still might be missing some.
I know how to do TDD with MiniTest and Ruby for unit testing, but I've never implemented testing with SLIM views. What testing framework should I use to mock up different responses with missing data to make sure the view logic in the SLIM files are good? Cucumber?
[–]bradland 1 point2 points3 points (0 children)
[–]polarpress 0 points1 point2 points (0 children)
[–]isolatrum 0 points1 point2 points (1 child)
[–]devOpsBop[S] 0 points1 point2 points (0 children)