【发布时间】:2014-04-11 14:55:55
【问题描述】:
我有一个获取输入的方法。
module MyModule
extend self
def my_method(a)
puts a
end
end
我想确保该方法接收到带有键 :a, :b and :c 的哈希
MyModule.should_receive(:method).with(A_HASH_WITH_KEYS(:a,:b,:c))
calling the method
【问题讨论】:
标签: ruby-on-rails ruby unit-testing rspec