diff options
Diffstat (limited to 'test/test-users-guide.rb')
-rw-r--r-- | test/test-users-guide.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test-users-guide.rb b/test/test-users-guide.rb index f830665..2687a83 100644 --- a/test/test-users-guide.rb +++ b/test/test-users-guide.rb @@ -28,13 +28,21 @@ class KwarkUsersGuideTest < Test::Unit::TestCase s =~ /\A\$ (.*?)\n/ command = $1 expected = $' - ruby19 do + if ruby19? case @name when 'test_main_program1_result' expected.sub!('["eruby", "items", "x", "_buf"]', '[:_buf, :eruby, :items, :x]') when 'test_main_program2_result' expected.sub!('["_context", "x", "_buf"]', '[:_buf, :x, :_context]') end + elsif rubinius? + command.sub!(/^ruby\b/, 'rbx') + case @name + when 'test_main_program1_result' + expected.sub!('["eruby", "items", "x", "_buf"]', '["_buf", "eruby", "items", "x"]') + when 'test_main_program2_result' + expected.sub!('["_context", "x", "_buf"]', '["_buf", "x", "_context"]') + end end result = `#{command}` assert_text_equal(expected, result) |