forked from saasbook/hw-ruby-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hw1.log
54 lines (47 loc) · 1.59 KB
/
hw1.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Ruby intro part 1
#sum
should be defined
returns correct sum [20 points]
works on the empty array [10 points]
#max_2_sum
should be defined
returns the correct sum [7 points]
works even if 2 largest values are the same [3 points]
returns zero if array is empty [10 points]
returns value of the element if just one element [10 points]
#sum_to_n
should be defined
returns true when any two elements sum to the second argument [30 points]
returns false for any single element array [5 points]
returns false for an empty array [5 points]
#hello
should be defined
The hello method returns the correct string [30 points]
#starts_with_consonant?
should be defined
classifies true cases [10 points]
classifies false cases [10 points]
works on the empty string [5 points]
works on nonletters [5 points]
#binary_multiple_of_4?
should be defined
classifies valid binary numbers [30 points]
rejects invalid binary numbers [10 points]
BookInStock
should be defined
getters and setters
should set ISBN [10 points]
should set price [10 points]
should be able to change ISBN [10 points]
should be able to change price [10 points]
constructor
should reject invalid ISBN number [10 points]
should reject zero price [10 points]
should reject negative price [10 points]
#price_as_string
should be defined
should display 33.95 as "$33.95" [10 points]
should display 1.1 as $1.10 [10 points]
should display 20 as $20.00 [10 points]
Finished in 0.01461 seconds (files took 0.13553 seconds to load)
34 examples, 0 failures