summaryrefslogtreecommitdiff
path: root/test/text_test.rb
diff options
context:
space:
mode:
authorCharles Moulliard <ch007m@gmail.com>2014-02-03 12:27:18 +0100
committerDan Allen <dan.j.allen@gmail.com>2014-02-05 17:03:09 -0700
commit47a17845318ca5cc0ce101dc7e8a5fd4d7a22c98 (patch)
treedac68ead7727eb46e175d01e8ab143b446fe13a6 /test/text_test.rb
parent5a3854c98dc4dd0b81f6fb15501c9e5ff4af760a (diff)
refactor unit tests so they work in RubyMine
- explicitly add the test and lib directory to the load path - switch to the project root before running tests - add UTF-8 encoding magic header to all test files - exclude .gem file at root of project (where RubyMine puts it) This commit was modified from the original pull request by @mojavelinux
Diffstat (limited to 'test/text_test.rb')
-rw-r--r--test/text_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/text_test.rb b/test/text_test.rb
index 76ed4b3f..02d59339 100644
--- a/test/text_test.rb
+++ b/test/text_test.rb
@@ -1,5 +1,8 @@
# encoding: UTF-8
-require 'test_helper'
+unless defined? ASCIIDOCTOR_PROJECT_DIR
+ $: << File.dirname(__FILE__); $:.uniq!
+ require 'test_helper'
+end
context "Text" do
test "proper encoding to handle utf8 characters in document using html backend" do