lib/specinfra/helper/backend.rb in specinfra-0.0.10 vs lib/specinfra/helper/backend.rb in specinfra-0.0.11

- old
+ new

@@ -2,14 +2,12 @@ module Helper ['Exec', 'Ssh', 'Cmd', 'WinRM', 'ShellScript', 'Dockerfile'].each do |type| eval <<-EOF module #{type} def backend(commands_object=nil) - called_by_detect_os = caller[0] =~ /detect_os\.rb/ - if ! respond_to?(:commands) || called_by_detect_os + if ! respond_to?(:commands) commands_object = SpecInfra::Command::Base.new end - instance = SpecInfra::Backend::#{type}.instance instance.set_commands(commands_object || commands) instance end end