diff --git a/.path_progress b/.path_progress index 8d259c7..fe54006 100644 --- a/.path_progress +++ b/.path_progress @@ -1 +1 @@ -1,2,2,3,1,1,1,2,3,4,4,4,4,6,7,0,1,2,2,2,2,3,3,4,4,4,5,6,6,6,6,7,7,8,9,10,11,11,12,13,13,0,1,2,3,3,4,5,6,6,7,8,9,10,10,10,10,11,11,11,11,1,2,3,3,3,4,4,4,5,6,7,8,8,9,9,10,11,12,13,13,13,14,15,16,17,18,18,19,20,20,21,21,22,22,22,22,23,24,24,25,25,26 \ No newline at end of file +1,2,2,3,1,1,1,2,3,4,4,4,4,6,7,0,1,2,2,2,2,3,3,4,4,4,5,6,6,6,6,7,7,8,9,10,11,11,12,13,13,0,1,2,3,3,4,5,6,6,7,8,9,10,10,10,10,11,11,11,11,1,2,3,3,3,4,4,4,5,6,7,8,8,9,9,10,11,12,13,13,13,14,15,16,17,18,18,19,20,20,21,21,22,22,22,22,23,24,24,25,25,26,1,1,1,2,3,4,5,6,7,8,9,10,11,12,13,14 \ No newline at end of file diff --git a/about_control_statements.rb b/about_control_statements.rb index f323757..2c491e8 100644 --- a/about_control_statements.rb +++ b/about_control_statements.rb @@ -8,7 +8,7 @@ def test_if_then_else_statements else result = :false_value end - assert_equal __, result + assert_equal :true_value, result end def test_if_then_statements @@ -16,7 +16,7 @@ def test_if_then_statements if true result = :true_value end - assert_equal __, result + assert_equal :true_value, result end def test_if_statements_return_values @@ -25,14 +25,14 @@ def test_if_statements_return_values else :false_value end - assert_equal __, value + assert_equal :true_value, value value = if false :true_value else :false_value end - assert_equal __, value + assert_equal :false_value, value # NOTE: Actually, EVERY statement in Ruby will return a value, not # just if statements. @@ -42,19 +42,19 @@ def test_if_statements_with_no_else_with_false_condition_return_value value = if false :true_value end - assert_equal __, value + assert_equal nil, value end def test_condition_operators - assert_equal __, (true ? :true_value : :false_value) - assert_equal __, (false ? :true_value : :false_value) + assert_equal :true_value, (true ? :true_value : :false_value) + assert_equal :false_value, (false ? :true_value : :false_value) end def test_if_statement_modifiers result = :default_value result = :true_value if true - assert_equal __, result + assert_equal :true_value, result end def test_unless_statement @@ -62,7 +62,7 @@ def test_unless_statement unless false # same as saying 'if !false', which evaluates as 'if true' result = :false_value end - assert_equal __, result + assert_equal :false_value, result end def test_unless_statement_evaluate_true @@ -70,14 +70,14 @@ def test_unless_statement_evaluate_true unless true # same as saying 'if !true', which evaluates as 'if false' result = :true_value end - assert_equal __, result + assert_equal :default_value, result end def test_unless_statement_modifier result = :default_value result = :false_value unless false - assert_equal __, result + assert_equal :false_value, result end def test_while_statement @@ -87,7 +87,7 @@ def test_while_statement result = result * i i += 1 end - assert_equal __, result + assert_equal 3628800, result end def test_break_statement @@ -98,7 +98,7 @@ def test_break_statement result = result * i i += 1 end - assert_equal __, result + assert_equal 3628800, result end def test_break_statement_returns_values @@ -108,7 +108,7 @@ def test_break_statement_returns_values i += 1 end - assert_equal __, result + assert_equal 2, result end def test_next_statement @@ -119,7 +119,7 @@ def test_next_statement next if (i % 2) == 0 result << i end - assert_equal __, result + assert_equal [1,3,5,7,9], result end def test_for_statement @@ -128,7 +128,7 @@ def test_for_statement for item in array result << item.upcase end - assert_equal [__, __, __], result + assert_equal ["FISH", "AND", "CHIPS"], result end def test_times_statement @@ -136,7 +136,7 @@ def test_times_statement 10.times do sum += 1 end - assert_equal __, sum + assert_equal 10, sum end end