Permalink
Browse files

Merge pull request #141 from thinkerbot/add_assert_not_match

Add assert_not_match method for coffescript tests
  • Loading branch information...
2 parents 2f269cb + f677cb7 commit 5c60c36f9dc3188e755e9b67e905886bffff22b9 @rtomayko committed Aug 5, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/tilt_coffeescripttemplate_test.rb
@@ -5,6 +5,17 @@
require 'coffee_script'
class CoffeeScriptTemplateTest < Test::Unit::TestCase
+
+ unless method_defined?(:assert_not_match)
+ # assert_not_match is missing on 1.8.7, which uses assert_no_match
+ def assert_not_match(a, b)
+ unless a.kind_of?(Regexp)
+ a = Regexp.new(Regexp.escape(a))
+ end
+ assert_no_match(a,b)
+ end
+ end
+
test "is registered for '.coffee' files" do
assert_equal Tilt::CoffeeScriptTemplate, Tilt['test.coffee']
end

0 comments on commit 5c60c36

Please sign in to comment.