Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add assert_not_match method for coffescript tests #141

Merged
merged 1 commit into from

2 participants

@thinkerbot

Apparently 1.8.7 does not have the assert_not_match method (instead it has assert_no_match -- this was news to me). Add it to the coffescript tests so they pass in both 1.8.7 and 1.9.2.

@thinkerbot thinkerbot Add assert_not_match method for coffescript tests
Apparently 1.8.7 does not have the assert_not_match method (instead
it has assert_no_match).  Add it to the coffescript tests so they
pass.
f677cb7
@rtomayko
Owner

Merging. Thanks!

@rtomayko rtomayko merged commit 5c60c36 into rtomayko:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 9, 2012
  1. @thinkerbot

    Add assert_not_match method for coffescript tests

    thinkerbot authored
    Apparently 1.8.7 does not have the assert_not_match method (instead
    it has assert_no_match).  Add it to the coffescript tests so they
    pass.
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/tilt_coffeescripttemplate_test.rb
View
11 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
Something went wrong with that request. Please try again.