Skip to content

Instantly share code, notes, and snippets.

@sudodo
Created March 2, 2012 04:12
Show Gist options
  • Save sudodo/1955570 to your computer and use it in GitHub Desktop.
Save sudodo/1955570 to your computer and use it in GitHub Desktop.
rspec macher for system comamnd call.
RSpec::Matchers.define :call_system_command do |expected|
match do |actual|
actual.should_receive(:'`').with(/#{expected}/) #|| actual.should_receive(:system).with(expected)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment