spec/unit/builder/operation_spec.rb in evil-client-3.0.4 vs spec/unit/builder/operation_spec.rb in evil-client-3.1.0

- old
+ new

@@ -51,11 +51,11 @@ expect(subject).to eq parent end end describe "#new" do - subject { builder.new options } + subject { builder.new(**options) } it "creates operation with inherited options accepted by settings" do expect(subject).to be_a Evil::Client::Container::Operation expect(subject.schema).to eq schema expect(subject.options).to eq id: 83, user: "foo", password: "qux" @@ -64,11 +64,11 @@ describe "#call" do let(:operation) { double call: "success" } before { allow(builder).to receive(:new) { operation } } - subject { builder.call options } + subject { builder.call(**options) } it "builds and calls the operation at once" do expect(builder).to receive(:new).with options expect(operation).to receive(:call) expect(subject).to eq "success" @@ -77,10 +77,10 @@ describe "#[]" do let(:operation) { double call: "success" } before { allow(builder).to receive(:new) { operation } } - subject { builder[options] } + subject { builder[**options] } it "is an alias for #call" do expect(builder).to receive(:new).with options expect(operation).to receive(:call) expect(subject).to eq "success"