Hello.
I have a test problem when I should test arguments in method not by exact
matching buy with fuzzy matching.
For example I have this test:
require 'rspec'
describe do
it do
o = Object.new
o.should_receive(:api_send).with mode: :say
o.api_send mode: :say, time: Time.now + rand(1..10), bans: { login1:
{time: Time.now, expiration: Time.now + 100}}
end
end
I want helper to test that method api_send receive mode: :say, time:
Time.now + rand(1..10), bans: { login1: {time: Time.now, expiration:
Time.now + 100}} but I do not care about what time exactly is.
I want something like
inspect_api o, mode: :say, time: Time, bans: { login:1: {time: Time,
expiration: Time}}
Best regards.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users