diff options
| author | Paul Buetow <paul@buetow.org> | 2025-02-18 16:34:40 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-02-18 16:34:40 +0200 |
| commit | de93bdd4a9897a4dbe1e54a8e13944cce62b7ac9 (patch) | |
| tree | fe0b3cab6004cd2eee3198011238fe0a912aa1bf /test/lib | |
| parent | a96932d5274537603fc718545b91e54eaedcef05 (diff) | |
refactor
Diffstat (limited to 'test/lib')
| -rw-r--r-- | test/lib/dslkeywords/dependency_test.rb | 2 | ||||
| -rw-r--r-- | test/lib/dslkeywords/file_test.rb | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/lib/dslkeywords/dependency_test.rb b/test/lib/dslkeywords/dependency_test.rb index aeb2790..48a3e1a 100644 --- a/test/lib/dslkeywords/dependency_test.rb +++ b/test/lib/dslkeywords/dependency_test.rb @@ -34,7 +34,7 @@ class RCMDependencyTest < Minitest::Test end def test_depends_on_invalid_resource - assert_raises(RCM::ResourceDependencies::NoSuchResourceType) do + assert_raises(RCM::Keyword::KeywordError) do configure_from_scratch do notify { depends_on invalid('baz') } end diff --git a/test/lib/dslkeywords/file_test.rb b/test/lib/dslkeywords/file_test.rb index eaece2d..4c38dc9 100644 --- a/test/lib/dslkeywords/file_test.rb +++ b/test/lib/dslkeywords/file_test.rb @@ -47,15 +47,15 @@ class RCMFileTest < Minitest::Test configure_from_scratch do file :create_file_empty_directory_test do path file_path - create_parent_directory - is :present + manage directory :text end file :delete_file_empty_directory_test do path file_path + is absent + manage directory depends_on file :create_file_empty_directory_test - is :clean end end @@ -116,11 +116,11 @@ class RCMFileTest < Minitest::Test assert_equal 'Whats up?', File.read(FILE_PATH) end - def test_create_parent_directory + def test_manage_directory file_path = "#{DIR_PATH}/foo/bar/baz/foo.txt" configure_from_scratch do file file_path do - create_parent_directory + manage directory :content end end @@ -137,13 +137,13 @@ class RCMFileTest < Minitest::Test configure_from_scratch do file :original do path file_path - create_parent_directory + manage directory original_content end file :new do path file_path - create_parent_directory + manage directory depends_on file(:original) :new_content end |
