Groovy with spork framework

How to do argument capture with spock framework?

http://java.dzone.com/articles/spocklight-writing-assertions

 

example:
        1*dao.save(_) >> { arguments ->
            User user = arguments[0]
            assert user.getName() == "zzt"

        }

 

关于Spy

def spy = Spy(Person, constructorArgs: ["zzt"])

你可能感兴趣的:(framework)