1

I have Rspec test cases but I want write some data from variables into Rspec output file for further processing, so how to write into output file generated by --out rspec_results.html

4
  • Its a little unclear what you are asking, can you reword your question. Commented Dec 5, 2017 at 11:44
  • Maybe you want to redirect rspec output into file? In this case unix stream might help you: rspec spec > rspec_result.txt Commented Dec 5, 2017 at 12:13
  • I want to write into Rspec output file from my ruby Rspec testcase code..like writing in std out Commented Dec 5, 2017 at 12:15
  • @nattfodd thanks but I have generated Rspec report with me. I just want to add some data to that file from testcases itself. Commented Dec 5, 2017 at 12:17

1 Answer 1

3

In your spec_helper.rb file write down this code

RSpec.configure do |config|
  config.example_status_persistence_file_path = 'spec/examples.txt'
end
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.