Ad
  • Custom User Avatar
    it "should raise an error for string with illegal characters" do
      Test.expect_error(luck_check('6F43E8'))
    end 
    

    is obviously wrong - can't catch an exception that has already happened. that needs to be in a block. still strange that it doesn't complain when it doesn't raise when that's what it says it tests for. doesn't really matter though, unless this also happens for MRI 3.0.0

  • Custom User Avatar

    For some reason, I was getting an error message that my Ruby code was not throwing an error when I pushed "Test" although my code had this line: raise ArgumentError, "string with illegal characters" if str.empty? || str.match?(/\D/). By commenting out this line, the test passed. However, it wouldn't pass when I pushed "Attempt". So, I removed the # to uncomment the error line before pushing "Attempt", and the code was accepted.