spec/shelly/app_spec.rb in shelly-0.2.3 vs spec/shelly/app_spec.rb in shelly-0.2.4
- old
+ new
@@ -428,9 +428,23 @@
@app.stub(:content).and_return(content)
@app.whenever?.should be_false
end
end
+ describe "#sidekiq?" do
+ it "should return true if present" do
+ content = {"servers" => {"app1" => {"sidekiq" => true}}}
+ @app.stub(:content).and_return(content)
+ @app.sidekiq?.should be_true
+ end
+
+ it "should return false if not present" do
+ content = {"servers" => {"app1" => {"size" => "small"}}}
+ @app.stub(:content).and_return(content)
+ @app.sidekiq?.should be_false
+ end
+ end
+
describe "#application_logs_tail" do
it "should execute given block for logs fetched from API" do
@client.should_receive(:application_logs_tail).with("foo-staging").and_yield("GET / 127.0.0.1")
out = ""
@app.application_logs_tail { |logs| out << logs }