I am creating a test automation tool that runs a rspec test from within ruby, not from command line.
I run my test like this that runs and gives me a output hash with pass / fail etc.
config = RSpec.configuration
json_formatter = RSpec::Core::Formatters::JsonFormatter.new(config.out)
reporter = RSpec::Core::Reporter.new(json_formatter)
config.instance_variable_set(:@reporter, reporter)
RSpec::Core::Runner.run(["#{Rails.root}/spec/test1_spec.rb"])
puts json_formatter.output_hash All is great until i run it again and i get the error
> undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_7:0x007ff3d343d978>how do i reload / make sure all spec_helper and files are loaded before i run it again ?
thanks Rick