diff options
| author | Charles Moulliard <ch007m@gmail.com> | 2014-02-03 12:27:18 +0100 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2014-02-05 17:03:09 -0700 |
| commit | 47a17845318ca5cc0ce101dc7e8a5fd4d7a22c98 (patch) | |
| tree | dac68ead7727eb46e175d01e8ab143b446fe13a6 /test/reader_test.rb | |
| parent | 5a3854c98dc4dd0b81f6fb15501c9e5ff4af760a (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/reader_test.rb')
| -rw-r--r-- | test/reader_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb index 077a1130..f6cc31e9 100644 --- a/test/reader_test.rb +++ b/test/reader_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 class ReaderTest < Test::Unit::TestCase DIRNAME = File.expand_path(File.dirname(__FILE__)) |
