Class: TestQueue::TestFramework::RSpec
- Inherits:
-
TestQueue::TestFramework
- Object
- TestQueue::TestFramework
- TestQueue::TestFramework::RSpec
- Defined in:
- lib/test_queue/runner/rspec.rb
Constant Summary
Constants inherited from TestQueue::TestFramework
Instance Method Summary collapse
Instance Method Details
#all_suite_files ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/test_queue/runner/rspec.rb', line 53 def all_suite_files = ::RSpec::Core::ConfigurationOptions.new(ARGV) . if .respond_to?(:parse_options) .configure(::RSpec.configuration) if ::RSpec.configuration.instance_variable_defined?(:@files_or_directories_to_run) && ::RSpec.configuration.instance_variable_get(:@files_or_directories_to_run).empty? ::RSpec.configuration.instance_variable_set(:@files_or_directories_to_run, [::RSpec.configuration.default_path]) end ::RSpec.configuration.files_to_run.uniq end |
#suites_from_file(path) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/test_queue/runner/rspec.rb', line 66 def suites_from_file(path) ::RSpec.world.example_groups.clear load path split_groups(::RSpec.world.example_groups).map { |example_or_group| name = if example_or_group.respond_to?(:id) example_or_group.id elsif example_or_group.respond_to?(:full_description) example_or_group.full_description elsif example_or_group..key?(:full_description) example_or_group.[:full_description] else example_or_group.[:example_group][:full_description] end [name, example_or_group] } end |