require File.expand_path(File.dirname(__FILE__) + '/spec_helper') # This matcher is necessary because the expected/actual strings look just # like bits of regular Ruby backtraces, which apparently is how autotest # figures out which files to test. Outputting bits of the backtraces from # the testapp's test harness mightily confuses an autotest running Spackle. Spec::Matchers.define :have_spackle do |expected| match do |actual| actual.spackle_output == expected end def sanitize(str) str.gsub(/_spec.rb/, '_s_p_e_c_dot_r_b') end failure_message_for_should do |actual| <<-EOF Expected spackles to match, but they didn't! Note that the "expected" and "got" below have been transformed so autotest doesn't get confused and blow up. See spec/integration_spec.rb for details. COMMAND #{actual.command} EXPECTED: #{sanitize expected } GOT: #{sanitize actual.spackle_output} EOF end end if ENV['INTEGRATE_SPACKLE'] # -- expected spackles --------------------------------------------------- FAILING_WORKING_CLASS = <