ob-ruby: fix a24775dc79 again
[org-mode/org-tableheadings.git] / testing / lisp / test-ob-ruby.el
blobb3231cd69ea9a4aad0983a5747aa86ce3bc51315
1 ;;; test-ob-ruby.el --- tests for ob-ruby.el
3 ;; Copyright (c) 2013 Oleh Krehel
4 ;; Authors: Oleh Krehel
6 ;; This program is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation, either version 3 of the License, or
9 ;; (at your option) any later version.
11 ;; This program is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
19 ;;; Code:
20 (org-test-for-executable "ruby")
21 (unless (featurep 'ob-ruby)
22 (signal 'missing-test-dependency "Support for Ruby code blocks"))
24 (ert-deftest test-ob-ruby/session-output ()
25 (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output
26 s = \"1\"
27 s = \"2\"
28 s = \"3\"
29 puts s
30 #+end_src"
31 (org-ctrl-c-ctrl-c)
32 (substring-no-properties
33 (buffer-string)))
34 "#+begin_src ruby :session :results output
35 s = \"1\"
36 s = \"2\"
37 s = \"3\"
38 puts s
39 #+end_src
41 #+RESULTS:
42 : 3
44 ")))
46 (provide 'test-ob-ruby)
48 ;;; test-ob-ruby.el ends here