mikejdorm / sftp_ex

MIT License
25 stars 23 forks source link

nil.start/0 error #2

Closed boxxxie closed 7 years ago

boxxxie commented 7 years ago
test something (Project.Api.VirtualBrokerTest)
     test/virtal_broker/virtual_broker_test.exs:14
     ** (UndefinedFunctionError) function nil.start/0 is undefined or private
     stacktrace:
       nil.start()
       (sftp_ex) lib/sftp/connection_service.ex:25: SFTP.ConnectionService.connect/3
       test/virtal_broker/virtual_broker_test.exs:15: (test)

this is the @ssh.start() call it seems like even when i set up my config the same as your dev config file, this isn't good enough for setting up the dependency.

mikejdorm commented 7 years ago

Thanks for pointing this out. I added a default argument so the module will no longer be nil. The mocked services I'm using in the unit tests are not provided with the dependency so it was defaulting to nil. I released this change as version "0.2.1". Let me know if this works for you.