Sha256: b3259221ac5cd7f93d403316d84c310211e62186ac595a6f691176c0af56e783
Contents?: true
Size: 741 Bytes
Versions: 17
Compression:
Stored size: 741 Bytes
Contents
# encoding: utf-8 require File.expand_path('../test_helper', __FILE__) require 'task_list' require 'task_list/filter' class TaskListTest < Minitest::Test class Record < Struct.new(:body) def task_list_items [] end end def test_has_summary assert summary = task_list("- [ ] one").summary, "summary expected" assert_kind_of TaskList::Summary, summary end def test_complete_item item = TaskList::Item.new("[x]", "complete") assert item.complete?, "expected to be complete" end def test_incomplete_item item = TaskList::Item.new("[ ]", "incomplete") assert !item.complete?, "expected to be incomplete" end protected def task_list(text) TaskList.new(Record.new(text)) end end
Version data entries
17 entries across 17 versions & 2 rubygems