I was thiking of passing meaningful data into a test case class I have
class Test_Case_1
def initialize() #not sure as yet as to what to enter here
log.detail_test_case(test[:name], .....])
I dont want to hard code the data into the class, and was thinking of
passing test data during initialisation. I could then initialise the
class x number of times with different test data.
irb(main):001:0> def foo(h) h end
=> nil
irb(main):002:0> foo(:name => “hello”, :age => 22)
=> {:name=>“hello”, :age=>22}
So, I can put a placeholder in this method
def initialize(x)
It depends on what you want to do how you would implement initialize here.
My aim is put put test data somewhere meaningful, but for the tests
to be easily read.