A potential clue for a workaround: I have code just like this that runs 
fine in a resque worker.



On Thursday, May 15, 2014 3:44:54 PM UTC-7, [email protected] wrote:
>
> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/eacf48a1-b327-4903-8043-d56d91c6b24e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to