spec/integration/dsl_spec.rb in capistrano-3.18.1 vs spec/integration/dsl_spec.rb in capistrano-3.19.0
- old
+ new
@@ -590,41 +590,41 @@
expect(rps).to eq(Set[{ hostname: "example3.com", role: :app }, { hostname: "example1.com", role: :web, port: 80 }, { hostname: "example2.com", role: :web, port: 81 }])
end
it "yields the properties for a single role" do
recipient = mock("recipient")
- recipient.expects(:doit).with("example1.com", :redis, port: 6379, type: :slave)
- recipient.expects(:doit).with("example2.com", :redis, port: 6379, type: :master)
+ recipient.expects(:doit).with("example1.com", :redis, { port: 6379, type: :slave })
+ recipient.expects(:doit).with("example2.com", :redis, { port: 6379, type: :master })
dsl.role_properties(:redis) do |host, role, props|
recipient.doit(host, role, props)
end
end
it "yields the properties for multiple roles" do
recipient = mock("recipient")
- recipient.expects(:doit).with("example1.com", :redis, port: 6379, type: :slave)
- recipient.expects(:doit).with("example2.com", :redis, port: 6379, type: :master)
+ recipient.expects(:doit).with("example1.com", :redis, { port: 6379, type: :slave })
+ recipient.expects(:doit).with("example2.com", :redis, { port: 6379, type: :master })
recipient.expects(:doit).with("example3.com", :app, nil)
dsl.role_properties(:redis, :app) do |host, role, props|
recipient.doit(host, role, props)
end
end
it "yields the merged properties for multiple roles" do
recipient = mock("recipient")
- recipient.expects(:doit).with("example1.com", :redis, port: 6379, type: :slave)
- recipient.expects(:doit).with("example2.com", :redis, port: 6379, type: :master)
- recipient.expects(:doit).with("example1.com", :web, port: 80)
- recipient.expects(:doit).with("example2.com", :web, port: 81)
+ recipient.expects(:doit).with("example1.com", :redis, { port: 6379, type: :slave })
+ recipient.expects(:doit).with("example2.com", :redis, { port: 6379, type: :master })
+ recipient.expects(:doit).with("example1.com", :web, { port: 80 })
+ recipient.expects(:doit).with("example2.com", :web, { port: 81 })
dsl.role_properties(:redis, :web) do |host, role, props|
recipient.doit(host, role, props)
end
end
it "honours a property filter before yielding" do
recipient = mock("recipient")
- recipient.expects(:doit).with("example1.com", :redis, port: 6379, type: :slave)
- recipient.expects(:doit).with("example1.com", :web, port: 80)
+ recipient.expects(:doit).with("example1.com", :redis, { port: 6379, type: :slave })
+ recipient.expects(:doit).with("example1.com", :web, { port: 80 })
dsl.role_properties(:redis, :web, select: :active) do |host, role, props|
recipient.doit(host, role, props)
end
end
end