-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathunicorn_test.rb
35 lines (29 loc) · 875 Bytes
/
unicorn_test.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
31
32
33
34
35
gem 'minitest'
require 'minitest/autorun'
require 'minitest/pride'
class UnicornTest < Minitest::Test
def test_it_has_a_name
unicorn = Unicorn.new("Robert")
assert_equal "Robert", unicorn.name
end
def test_it_is_white_by_default
skip
unicorn = Unicorn.new("Margaret")
assert_equal "white", unicorn.color
assert_equal true, unicorn.white?
assert unicorn.white?
end
def test_it_does_not_have_to_be_white
skip
unicorn = Unicorn.new("Barbara", "purple")
assert_equal "purple", unicorn.color
assert_equal false, unicorn.white?
refute unicorn.white?
end
def test_unicorn_says_sparkly_stuff
skip
unicorn = Unicorn.new("Johnny")
assert_equal "**;* Wonderful! **;*", unicorn.say("Wonderful!")
assert_equal "**;* I don't like you very much. **;*", unicorn.say("I don't like you very much.")
end
end