test/squiggle_test.rb in radius-ts-1.1.0 vs test/squiggle_test.rb in radius-ts-1.3.0
- old
+ new
@@ -8,11 +8,11 @@
@context = new_context
@parser = Radius::Parser.new(@context, :scanner => Radius::SquiggleScanner.new)
end
def test_sane_scanner_default
- assert_kind_of Radius::Scanner, Radius::Parser.new.scanner
+ assert !Radius::Parser.new.scanner.is_a?(Radius::SquiggleScanner)
end
def test_initialize_with_params
@parser = Radius::Parser.new(:scanner => Radius::SquiggleScanner.new)
assert_kind_of Radius::SquiggleScanner, @parser.scanner
@@ -231,9 +231,14 @@
def test_does_not_pollute_copied_globals
@context.globals.foo = 'bar'
parser = Radius::Parser.new(@context)
parser.context.globals.foo = '[baz]'
assert_equal 'bar', @context.globals.foo
+ end
+
+ def test_parse_with_other_namespaces
+ @parser = Radius::Parser.new(@context, :tag_prefix => 'r')
+ assert_equal "{fb:test}hello world{/fb:test}", @parser.parse("{fb:test}hello world{/fb:test}")
end
protected
def assert_parse_output(output, input, message = nil)