Sha256: 4f76265b98ece840c9c05d98f3ee6ef98688a1a94b583211b3edae065f373a28
Contents?: true
Size: 611 Bytes
Versions: 32
Compression:
Stored size: 611 Bytes
Contents
require "rails_helper" describe Releaf::Service do class DummyServiceIncluder include Releaf::Service attribute :some, String attribute :thing, String def call; end end describe ".call" do it "initialize new service instance and return `#call` method value" do subject = DummyServiceIncluder.new(some: "asd", thing: "asdasd") allow(DummyServiceIncluder).to receive(:new).with(some: "x", thing: "y").and_return(subject) allow(subject).to receive(:call).and_return("_x_") expect(DummyServiceIncluder.call(some: "x", thing: "y")).to eq("_x_") end end end
Version data entries
32 entries across 32 versions & 1 rubygems