2018-06-29 10:36:14 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
|
|
|
module Parfait
|
2018-06-29 13:26:25 +02:00
|
|
|
class TestAdapter < MiniTest::Test
|
2018-06-29 10:36:14 +02:00
|
|
|
|
|
|
|
def setup
|
2019-02-08 22:03:23 +01:00
|
|
|
Parfait.boot!(Parfait.default_test_options)
|
2018-06-29 10:36:14 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def test_list_create_from_array
|
|
|
|
array = [1,2,3]
|
|
|
|
list = Parfait.new_list(array)
|
|
|
|
assert_equal array , list.to_a
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_word_create_from_string
|
|
|
|
string = "something"
|
|
|
|
word = Parfait.new_word(string)
|
|
|
|
assert_equal word , Parfait.new_word(string)
|
|
|
|
assert_equal string , word.to_string
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|