I'm writing a custom matcher to allow testing of the exit status of code.

I've written the matcher as an object using the bits of information I could 
find.

I'm using `config.include(Rspec::ExitMatchers)` to include a module which 
has one method which creates an instance of my matcher, however this method 
receives the expected value, not the block passed to `expect`, so how do I 
create an instance of my matcher since the initializer needs the block 
(actual), not the expected value which should be passed to `matches?`...

https://github.com/krisleech/rspec-exit_matchers/blob/master/lib/rspec/exit_matchers.rb#L38

https://github.com/krisleech/rspec-exit_matchers/blob/master/spec/rspec/exit_matchers_spec.rb#L3

Any helps/pointers would be great. Thanks, Kris.


-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/e40ad0e2-e3ff-4fe5-9533-ded1032f9290%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to