Skip to content

fix Support type-restricted args #13 #36

Open
keizo3 wants to merge 1 commit intowaterlink:masterfrom
keizo3:feature/type_restricted
Open

fix Support type-restricted args #13 #36
keizo3 wants to merge 1 commit intowaterlink:masterfrom
keizo3:feature/type_restricted

Conversation

@keizo3
Copy link

@keizo3 keizo3 commented Feb 19, 2019

fixes #13

I tried to use it as follows
(I made it possible to specify a type)

module Notifier
  def self.notify(message : String)
  end
end

create_module_mock Notifier do
  mock self.notify(message : String)
end

allow(Notifier).to receive(self.notify("John")).and_return("Just great!")
Notifier.notify("John")    # => "Just great!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support type-restricted args

1 participant