test/controllers/projects_controller_test.rb
# Ensure that every criterion that is *supposed* to be in this level is
# selectable, and that every criterion that is *not* supposed to be in this
# level is not selectable.
# rubocop:disable Metrics/MethodLength
Ensure that every criterion that is *supposed* to be in this level is
selectable, and that every criterion that is *not* supposed to be in this
level is not selectable.
Ensure that every criterion that is * supposed * to be in this level is selectable and that every criterion that is * not * supposed to be in this level is not selectable .
def only_correct_criteria_selectable(level)
    Criteria.keys do |query_level|
      Criteria[query_level].each do |criterion|
        if query_level == level
          assert_select '#' + criterion.to_s
          assert_select "#project_#{criterion}_status_met"
        elsif !Criteria[level].key?(criterion)
          assert_select '#' + criterion.to_s, false
          assert_select "#project_#{criterion}_status_met", false
        end
      end
    end
  end
def only_correct_criteria_selectable ( level ) Criteria . keys do | query_level | Criteria [ query_level ] . each do | criterion | if query_level == level assert_select '#' + criterion . to_s assert_select "#project_#{criterion}_status_met" elsif ! Criteria [ level ] . key? ( criterion ) assert_select '#' + criterion . to_s , false assert_select "#project_#{criterion}_status_met" , false end end end end
Ensure that every criterion that is *supposed* to be in this level is
selectable, and that every criterion that is *not* supposed to be in this
level is not selectable.
Ensure that every criterion that is * supposed * to be in this level is selectable and that every criterion that is * not * supposed to be in this level is not selectable .
# This is criterion in another level, *not* this one
level
<not_specific>