Sha256: d671f0c110e06bb6adfbedac57f04819c4aa1d61c8b69a41842178e87eb213b0
Contents?: true
Size: 953 Bytes
Versions: 3
Compression:
Stored size: 953 Bytes
Contents
require_relative "../test_helper" require "text_tunnel/watched_file_repository" class WatchedFileRepositoryTest < MiniTest::Unit::TestCase def setup @repo = WatchedFileRepository.new end def test_create_returns_a_WatchedFile watched_file = @repo.create "foo", "bar" assert_kind_of WatchedFile, watched_file end def test_create_stores_created_WatchedFile watched_file = @repo.create "foo", "bar" assert_equal watched_file, @repo.find(watched_file.id) end def test_remove_makes_watched_file_no_longer_findable watched_file = @repo.create "foo", "bar" @repo.remove(watched_file) assert_raises(KeyError) { @repo.find(watched_file.id) } end def test_find_existing_WatchedFile watched_file = @repo.create "foo", "bar" assert_equal watched_file, @repo.find(watched_file.id) end def test_find_raises_KeyError_on_missing_id assert_raises(KeyError) { @repo.find("missing") } end end
Version data entries
3 entries across 3 versions & 1 rubygems