Class: Specserv::RSpecAdapter
- Inherits:
-
Object
- Object
- Specserv::RSpecAdapter
- Defined in:
- lib/specserv/rspec_adapter.rb
Instance Method Summary collapse
Instance Method Details
#run(source_path) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/specserv/rspec_adapter.rb', line 6 def run( source_path ) RSpec.reset # create a StringIO to capture output errors = StringIO.new output = StringIO.new # run rspec RSpec::Core::Runner.run([source_path, '--format', 'html'], errors, output) # return the captured output output.string end |