Sha256: b2d5a6e9ea0696a7da94778e9c93a108506a669109e44ed8e0a90e54a0b0149b

Contents?: true

Size: 791 Bytes

Versions: 8

Compression:

Stored size: 791 Bytes

Contents

require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'tmpdir'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'hydra'

# Since Hydra turns off testing, we have to turn it back on
Test::Unit.run = false

class Test::Unit::TestCase
  def target_file
    File.expand_path(File.join(Dir.tmpdir, 'hydra_test.txt'))
  end

  def test_file
    File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'write_file.rb'))
  end
end

module Hydra #:nodoc:
  module Messages #:nodoc:
    class TestMessage < Hydra::Message
      attr_accessor :text
      def initialize(opts = {})
        @text = opts.fetch(:text){ "test" }
      end
      def serialize
        super(:text => @text)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hydra-0.14.1 test/test_helper.rb
hydra-0.14.0 test/test_helper.rb
hydra-0.13.0 test/test_helper.rb
hydra-0.12.0 test/test_helper.rb
hydra-0.11.0 test/test_helper.rb
hydra-0.10.3 test/test_helper.rb
hydra-0.10.2 test/test_helper.rb
hydra-0.10.1 test/test_helper.rb