Class: TestThat::RspecTester
- Inherits:
-
Object
- Object
- TestThat::RspecTester
- Defined in:
- lib/test_that/rspec_tester.rb
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #select_tests(files) ⇒ Object
- #test_all_command ⇒ Object
- #test_files_command(files) ⇒ Object
Instance Method Details
#enabled? ⇒ Boolean
5 6 7 |
# File 'lib/test_that/rspec_tester.rb', line 5 def enabled? File.directory?("spec") end |
#select_tests(files) ⇒ Object
9 10 11 12 13 |
# File 'lib/test_that/rspec_tester.rb', line 9 def select_tests(files) files .select { |f| f.start_with?("spec/") } .select { |f| f.end_with?("_spec.rb") } end |
#test_all_command ⇒ Object
15 16 17 |
# File 'lib/test_that/rspec_tester.rb', line 15 def test_all_command "rspec" end |
#test_files_command(files) ⇒ Object
19 20 21 |
# File 'lib/test_that/rspec_tester.rb', line 19 def test_files_command(files) ["rspec", *files].join(" ") end |