restructured tests to rails-style naming conventions
This commit is contained in:
parent
4295ef6a80
commit
b37918dd05
4
Rakefile
4
Rakefile
|
@ -21,7 +21,7 @@ end
|
||||||
require 'rake/testtask'
|
require 'rake/testtask'
|
||||||
Rake::TestTask.new(:test) do |test|
|
Rake::TestTask.new(:test) do |test|
|
||||||
test.libs << 'lib' << 'test'
|
test.libs << 'lib' << 'test'
|
||||||
test.pattern = 'test/**/test_*.rb'
|
test.pattern = 'test/**/*_test.rb'
|
||||||
test.verbose = true
|
test.verbose = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ begin
|
||||||
require 'rcov/rcovtask'
|
require 'rcov/rcovtask'
|
||||||
Rcov::RcovTask.new do |test|
|
Rcov::RcovTask.new do |test|
|
||||||
test.libs << 'test'
|
test.libs << 'test'
|
||||||
test.pattern = 'test/**/test_*.rb'
|
test.pattern = 'test/**/*_test.rb'
|
||||||
test.verbose = true
|
test.verbose = true
|
||||||
end
|
end
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
|
|
@ -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
|
should "be true" do
|
||||||
assert true
|
assert true
|
||||||
end
|
end
|
||||||
|
|
|
@ -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
|
should "write file" do
|
||||||
File.open(File.join(Dir.tmpdir, 'hydra_test.txt'), 'w') do |f|
|
File.open(File.join(Dir.tmpdir, 'hydra_test.txt'), 'w') do |f|
|
||||||
f.write "HYDRA"
|
f.write "HYDRA"
|
||||||
|
|
|
@ -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
|
class MyMessage < Hydra::Message
|
||||||
attr_accessor :my_var
|
attr_accessor :my_var
|
||||||
def serialize
|
def serialize
|
||||||
|
@ -17,7 +17,7 @@ class TestMessage < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
should "serialize" do
|
should "serialize" do
|
||||||
assert_equal(
|
assert_equal(
|
||||||
{:class=>TestMessage::MyMessage, :my_var=>"my value"},
|
{:class=>MyMessage, :my_var=>"my value"},
|
||||||
eval(@m.serialize)
|
eval(@m.serialize)
|
||||||
)
|
)
|
||||||
end
|
end
|
|
@ -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
|
context "a pipe" do
|
||||||
setup do
|
setup do
|
||||||
@pipe = Hydra::Pipe.new
|
@pipe = Hydra::Pipe.new
|
|
@ -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
|
context "a test runner" do
|
||||||
setup do
|
setup do
|
||||||
@pipe = Hydra::Pipe.new
|
@pipe = Hydra::Pipe.new
|
|
@ -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
|
context "an ssh connection" do
|
||||||
setup do
|
setup do
|
||||||
@ssh = Hydra::SSH.new(
|
@ssh = Hydra::SSH.new(
|
Loading…
Reference in New Issue