From: Brian Candler Date: 2010-05-12T22:35:27+09:00 Subject: Re: Unit Test of method calling system() - how? he error is pretty clear when you break it down. > optparse_swapcase_seq_test.rb:183:in `block in ']: > unexpected invocation: #.print_usage_and_exit(true) "You called print_usage_and_exit(true), and I wasn't expecting that" > unsatisfied expectations: > - expected exactly once, not yet invoked: > #.print_usage_and_exit(:full) "I was expecting you to call print_usage_and_exit(:full), and you never did" So the expectation you set (that the method would be called with argument ':full') doesn't match the reality (that your code calls the method with argument 'true') -- Posted via http://www.ruby-forum.com/.