-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobject_state04.rb
30 lines (23 loc) · 955 Bytes
/
object_state04.rb
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
require "minitest/autorun"
################################################################################
# Extend the class you see here to satisfy the test code.
#
# Only add lines, don't change any lines!
################################################################################
class Character
end
################################################################################
# This is the test testing your code, do not change this.
# After you're done, check solutions/solution_04.rb and compare
# your results.
################################################################################
class ObjectStateTest < Minitest::Test
def test_04
character = Character.new
character.name = "Diana"
# We now set the name when creating this object.
# If we call the `name` method on this object
# we want to have the name returned that is set in the constructor
assert_equal "Diana", character.name
end
end