Skip to content

Instantly share code, notes, and snippets.

@scottdavis
Created December 29, 2010 21:47
Show Gist options
  • Select an option

  • Save scottdavis/759118 to your computer and use it in GitHub Desktop.

Select an option

Save scottdavis/759118 to your computer and use it in GitHub Desktop.
require 'test/unit'
require 'test/unit/assertions'
require 'rubygems'
require 'shoulda'
require '../tesseract/tesseract'
class TesseractTest < Test::Unit::TestCase
context "test dependency os check fails windows" do
setup do
@old_val = RUBY_PLATFORM
Object.const_set("RUBY_PLATFORM", 'windows')
end
should "throw exception" do
assert_exception Exception, Tesseract::DependcyChecker::OS_ERROR do
@tess = Tesseract::Process.new('photo.jpeg')
end
end
teardown do
Object.const_set("RUBY_PLATFORM", @old_val)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment