I have a unit test method in my test/unit/model_test.rb :
def valid_sendRequestXML(account)
Hpricot.XML <<-XML
<ticket>#{account.api_token}</ticket>
XML
end
And I’m trying to manually run some things in my console to see what is failing where. Is it possible to somehow call this method within console? If so, how?
You can require unit test files just like any other Ruby file. The unit tests are methods of a class, so you can instantiate the testcase and run the methods you’d wish to run.
Also consider using pry. Just put
binding.pryin your unit test, run it will open a console for you to inspect all the local variables (and other stuff) in.