Commit Graph

24 Commits

Author SHA1 Message Date
RFelix
8de356c598 Removed duplicated array assignment tests from about_arrays.rb which are also in about_array_assignment.rb 2009-10-08 13:24:13 -04:00
Robert Osborne
73805b3e0e re-wrote a bit of explanation of red/green/refactor 2009-10-08 13:19:46 -04:00
Robert Osborne
e225b1612c fixed typoo in def test_any_ruby_expression_my_be_interpolated 2009-10-08 13:19:07 -04:00
Robert Osborne
b3226809ad method name test_if_then_else_statements was duplicated, overwriting the first def. 2009-10-08 13:18:41 -04:00
Robert Osborne
dbaadf80b7 Edited GREED_RULES 2009-10-08 13:17:00 -04:00
capitalist
e871052dd3 Fix typo 2009-10-08 13:09:14 -04:00
capitalist
41ef277f40 Fixed typo and faulty expectation.
There are three twos = 200 and one five = 50 => so this should be 250

Also, here's my score method - I feel like I over complicated this:
# def score(dice)
#   #count em up
#   results = dice.inject(Hash.new) {|h, die| h[die] = h[die] ? h[die] + 1 : 1; h }
#
#   #convert to scores
#   score = results.keys.inject(0) do |s,k|
#     s += \
#     case k
#     when 1
#       results[k] >= 3 ? 1000 + (results[k]-3)*100  : results[k] * 100
#     when 2..4,6
#       results[k] >= 3 ? 100*k : 0
#     when 5
#       results[k] >= 3 ? 500 + (results[k]-3)*50  : results[k] * 50
#     else
#       0
#     end
#   end
# end
2009-10-08 13:08:45 -04:00
Marc Peabody
d9e77d26f2 Merge branch 'master' of git://github.com/caius/ruby_koans into caius/master 2009-10-08 10:35:50 -04:00
Marc Peabody
17ac70bd4d hash keys and values must assert against sorted arrays - thanks gregmalcolm 2009-10-08 10:16:57 -04:00
unknown
f9017915dc Cleanup of "cross method" test on the Bulldog, by removing the unfinished test and also Bulldog.growl method, which becomes obsolete. 2009-03-17 21:57:25 -04:00
unknown
fcf5bd860d I renamed the class to AboutTriangleAssignment2 as this was messing with the testing order.
Using the same class name as the other Triangle Assignment was affecting the testing order, causing this assignment to show up before about_exceptions.
2009-03-17 21:50:41 -04:00
unknown
d8d1d4cc64 Provided an alternative test_hash_keys_and_values function.
Asserts on hash.keys or hash.values can not be relied on as the order is random (I had an expected values of [:two, :one] when I got to that test).
2009-03-17 21:38:05 -04:00
Caius Durling
77013b1afd Assigning a variable so the test passes when correct code is added. 2009-02-07 02:13:34 +00:00
Jonathan Lim
9e799a7178 Ensuring method names unique.
Ensuring that later class method definitions don't mess with earlier tests.
Renaming test to reflect that other objects are not affected by singleton methods on objects.

Signed-off-by: edgecase <github@theedgecase.com>
2009-01-29 02:22:42 +08:00
Jonathan Lim
4b65b1f52d Fixing scores
Signed-off-by: edgecase <github@theedgecase.com>
2009-01-29 02:22:41 +08:00
Joe O'Brien
8f9afc4b4a adding attribution and another tweak to the wording 2009-01-26 15:41:59 -05:00
Joe O'Brien
23eeab4d82 small formatting tweak 2009-01-26 15:28:25 -05:00
Joe O'Brien
323e7b757c no comment 2009-01-26 15:26:31 -05:00
Joe O'Brien
9cf8de55e4 almost finished with the readme. At what point do we begin splitting them into chapters 2009-01-26 15:23:13 -05:00
Joe O'Brien
100c0cf378 still tweaking readme 2009-01-26 13:22:49 -05:00
Joe O'Brien
7d59878eaa moving files around a bit 2009-01-26 12:11:46 -05:00
Joe O'Brien
b4e4d37cb5 changing readme to get formatted on GH; adding license 2009-01-26 12:05:37 -05:00
Joe O'Brien
4e78262965 moving to a new repo 2009-01-26 11:56:38 -05:00
Joe O'Brien
55fd4afa0f first commit 2009-01-26 11:50:41 -05:00