spec/models/checkbox_spec.rb
Block has too many lines. [29/25] Open
Open
describe Checkbox do
let!(:checkbox) { Checkbox.new id: 10, type: "Checkbox", seq: 1.0, txt: "test txt", weight: 11 }
let!(:answer) { Answer.new answer: 1 }
let!(:checkbox1) { Checkbox.create(id: 1, type: 'Checkbox', seq: 2.0, txt: 'test txt2', weight: 11) }
let!(:checkbox2) { Checkbox.create(id: 2, type: 'Checkbox', seq: 3.0, txt: 'test txt3', weight: 12) }
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Line is too long. [617/160] Open
Open
expect(html).to eq("<input id=\"responses_1_comments\" name=\"responses[1][comment]\" type=\"hidden\" value=\"\"><input id=\"responses_1_score\" name=\"responses[1][score]\" type=\"hidden\"value=\"1\"><input id=\"responses_1_checkbox\" type=\"checkbox\" onchange=\"checkbox1Changed()\"checked=\"checked\"><label for=\"responses_1\"> test txt3</label><script>function checkbox1Changed() { var checkbox = jQuery(\"#responses_1_checkbox\"); var response_score = jQuery(\"#responses_1_score\");if (checkbox.is(\":checked\")) {response_score.val(\"1\");} else {response_score.val(\"0\");}}</script><BR/>")
- Exclude checks
Line is too long. [175/160] Open
Open
expect(html).to eq("<TR><TD align=\"left\"> test txt3 </TD><TD align=\"left\">Checkbox</TD><td align=\"center\">12</TD><TD align=\"center\">Checked/Unchecked</TD></TR>")
- Exclude checks
Line is too long. [600/160] Open
Open
expect(html).to eq("<tr><td align=\"center\"><a rel=\"nofollow\" data-method=\"delete\" href=\"/questions/10\">Remove</a></td><td><input size=\"6\" value=\"1.0\" name=\"question[10][seq]\" id=\"question_10_seq\" type=\"text\"></td><td><textarea cols=\"50\" rows=\"1\" name=\"question[10][txt]\" id=\"question_10_txt\" placeholder=\"Edit question content here\">test txt</textarea></td><td><input size=\"10\" disabled=\"disabled\" value=\"Checkbox\" name=\"question[10][type]\" id=\"question_10_type\" type=\"text\"></td><td><!--placeholder (UnscoredQuestion does not need weight)--></td></tr>")
- Exclude checks