On Monday, July 14, 2014 6:16:45 PM UTC-7, jeane wrote:
>
> Greetings,
>
> Im in a project and my task is to extract what is being evaluated in Rspec
> Expect matcher.
>
> I was able to extract data from Factorygirl by using a callback and output
> data to an Excel File.
>
> But now, they wanted me to extract Expect. I know there are lots of things
> going on to expect.
>
> is it possible to attach a callback or extend the Expect matcher in Rspec?
>
> Thank you in advance!
>
module ExpectHook
def expect(*args, &block)
puts "your logic here"
super
end
end
RSpec.configure do |config|
config.include ExpectHook
end
--
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/d82cf51e-5b0f-4536-aed1-a86a87ed31b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.