fluentd-ui/spec/support/stub_daemon.rb
2014-12-03 14:59:39 +09:00

13 lines
367 B
Ruby

module StubDaemon
shared_context 'stub daemon', stub: :daemon do
let!(:exists_user) { build(:user) }
let!(:daemon) { build(:fluentd, variant: "td-agent") }
before do
Fluentd.stub(:instance).and_return(daemon)
Fluentd::Agent::TdAgent.any_instance.stub(:detached_command).and_return(true)
daemon.agent.config_write ""
end
end
end