How to get Host Name and Port while running tests

188 views
Skip to first unread message

Ayan Biswas

unread,
Aug 3, 2021, 2:24:32 AM8/3/21
to rspec
Problem
I need to send some data to a path in the encoding format x-www-form-urlencodedand by using Net::HTTP I am doing that from the spec file. But as Net::HTTP requires host and port for their operation , what Can I do ?

Context 
Also I need to implement the test for this , is there any alternative way to do that ?

Phil Pirozhkov

unread,
Aug 3, 2021, 2:26:17 AM8/3/21
to Jack Royal-Gordon
Ayan,

Can you please check my yesterday's answer on stackoverflow?
> --
> 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 rspec+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/18133026-5cb2-42b1-8485-06740010581en%40googlegroups.com.

Ayan Biswas

unread,
Aug 6, 2021, 5:01:53 AM8/6/21
to rspec
Yeah I solved the probelm.

Phil Pirozhkov

unread,
Aug 6, 2021, 5:05:25 AM8/6/21
to Jack Royal-Gordon
Mind sharing your solution?
> To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/03786f1e-3307-4756-8a15-834d613b00ebn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages