Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
Add "integration" test that uses exe/chandler
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson committed Jun 27, 2015
1 parent 4fa14d8 commit f81391c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/exe_test.rb
@@ -0,0 +1,19 @@
require "minitest_helper"

class ExeTest < Minitest::Test
def test_chandler_is_executable_and_exits_with_success
within_project_root do
Bundler.with_clean_env do
output = `bundle exec chandler --version`
assert_equal("chandler version #{Chandler::VERSION}\n", output)
assert($CHILD_STATUS.success?)
end
end
end

private

def within_project_root(&block)
Dir.chdir(File.expand_path("../..", __FILE__), &block)
end
end

0 comments on commit f81391c

Please sign in to comment.