Skip to content

Instantly share code, notes, and snippets.

@jaggy
Last active August 29, 2015 13:56
Show Gist options
  • Save jaggy/8923853 to your computer and use it in GitHub Desktop.
Save jaggy/8923853 to your computer and use it in GitHub Desktop.
Autorun PHPSpec with Observr [ https://github.com/kevinburke/observr ]
def run_phpspec
file = nil
unless ARGV[1].nil?
file = "spec/#{ARGV[1]}Spec.php"
end
command = "`which phpspec` run --format=pretty --no-code-generation -vv #{file}";
system( 'clear' )
system( command )
end
watch( '.*\.php' ) { |data| run_phpspec }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment