Open ericfranz opened 9 years ago
There is a FIXME comment on this test: https://github.com/AweSim-OSC/osc-machete/blob/280f5bc314652a18e3055e72066a3c240ef4f6e3/test/test_statusable.rb#L69-L96
In the test setup we can do something like:
th = TorqueHelper.default th.expects(:status).with("1234").returns("R") th.expects(:status).with("4567").returns("C")
etc. (however you do this in mocha)
then
TorqueHelper.expects(:default).returns(th)
So you can use actual Job objects in your tests instead of OpenStruct.
You would use a custom torque helper with stubbed methods.
There is a FIXME comment on this test: https://github.com/AweSim-OSC/osc-machete/blob/280f5bc314652a18e3055e72066a3c240ef4f6e3/test/test_statusable.rb#L69-L96
In the test setup we can do something like:
etc. (however you do this in mocha)
then
So you can use actual Job objects in your tests instead of OpenStruct.