restructured tests to rails-style naming conventions

This commit is contained in:
Nick Gauthier 2010-01-28 10:30:18 -05:00
parent 4295ef6a80
commit b37918dd05
8 changed files with 15 additions and 15 deletions

View File

@ -21,7 +21,7 @@ end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
@ -29,7 +29,7 @@ begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
rescue LoadError

View File

@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), '..', 'helper')
require File.join(File.dirname(__FILE__), '..', 'test_helper')
class TestAssertTrue < Test::Unit::TestCase
class AssertTrueTest < Test::Unit::TestCase
should "be true" do
assert true
end

View File

@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), '..', 'helper')
require File.join(File.dirname(__FILE__), '..', 'test_helper')
class TestWriteFile < Test::Unit::TestCase
class WriteFileTest < Test::Unit::TestCase
should "write file" do
File.open(File.join(Dir.tmpdir, 'hydra_test.txt'), 'w') do |f|
f.write "HYDRA"

View File

@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), 'helper')
require File.join(File.dirname(__FILE__), 'test_helper')
class TestMessage < Test::Unit::TestCase
class MessageTest < Test::Unit::TestCase
class MyMessage < Hydra::Message
attr_accessor :my_var
def serialize
@ -17,7 +17,7 @@ class TestMessage < Test::Unit::TestCase
end
should "serialize" do
assert_equal(
{:class=>TestMessage::MyMessage, :my_var=>"my value"},
{:class=>MyMessage, :my_var=>"my value"},
eval(@m.serialize)
)
end

View File

@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), 'helper')
require File.join(File.dirname(__FILE__), 'test_helper')
class TestPipe < Test::Unit::TestCase
class PipeTest < Test::Unit::TestCase
context "a pipe" do
setup do
@pipe = Hydra::Pipe.new

View File

@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), 'helper')
require File.join(File.dirname(__FILE__), 'test_helper')
class TestRunner < Test::Unit::TestCase
class RunnerTest < Test::Unit::TestCase
context "a test runner" do
setup do
@pipe = Hydra::Pipe.new

View File

@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), 'helper')
require File.join(File.dirname(__FILE__), 'test_helper')
class TestSSH < Test::Unit::TestCase
class SSHTest < Test::Unit::TestCase
context "an ssh connection" do
setup do
@ssh = Hydra::SSH.new(