Class: DirectorySearcherTest2
- Defined in:
- lib/directory_searcher.rb
Overview
Test class for DirectorySearcher
Instance Method Summary collapse
-
#setup ⇒ Object
Setup method to initialize common test data.
-
#test_find_directory_names_for_spec ⇒ Object
Test find_directory_names method for ‘spec’.
-
#test_find_file_names_for_spec ⇒ Object
Test find_file_names method for ‘spec’.
Instance Method Details
#setup ⇒ Object
Setup method to initialize common test data
248 249 250 251 252 253 254 |
# File 'lib/directory_searcher.rb', line 248 def setup @pattern_spec = /spec/ @paths = ['./spec'] @filename_glob = nil @searcher_spec = DirectorySearcher.new(@pattern_spec, @paths, filename_glob: @filename_glob) end |
#test_find_directory_names_for_spec ⇒ Object
Test find_directory_names method for ‘spec’
257 258 259 260 261 |
# File 'lib/directory_searcher.rb', line 257 def test_find_directory_names_for_spec # Replace with actual expected directory names containing 'spec' expected_dirs = ['./spec'] assert_equal expected_dirs, @searcher_spec.find_directory_names end |
#test_find_file_names_for_spec ⇒ Object
Test find_file_names method for ‘spec’
264 265 266 267 268 269 |
# File 'lib/directory_searcher.rb', line 264 def test_find_file_names_for_spec # Replace with actual expected file names containing 'spec' expected_files = ['./spec/cli_spec.rb', './spec/env_spec.rb', './spec/markdown_exec_spec.rb', './spec/tap_spec.rb'] assert_equal expected_files, @searcher_spec.find_file_names end |