Extract common requires in test files to test/test_helper.rb Run individual spec files with RUBYLIB=test ruby test/<test-file> (Thanks mislav)
This commit is contained in:
parent
52462b0e46
commit
c2ccf482b9
2
Rakefile
2
Rakefile
@ -1,3 +1,5 @@
|
|||||||
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'test')
|
||||||
|
|
||||||
desc "Run tests"
|
desc "Run tests"
|
||||||
task :test do
|
task :test do
|
||||||
Dir['test/**/*_test.rb'].each { |file| require file }
|
Dir['test/**/*_test.rb'].each { |file| require file }
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
require "test_helper"
|
||||||
require 'fakefs/safe'
|
|
||||||
require 'test/unit'
|
|
||||||
|
|
||||||
class FakeFileTest < Test::Unit::TestCase
|
class FakeFileTest < Test::Unit::TestCase
|
||||||
include FakeFS
|
include FakeFS
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
require "test_helper"
|
||||||
require 'fakefs/safe'
|
|
||||||
require 'test/unit'
|
|
||||||
|
|
||||||
class FakeSymlinkTest < Test::Unit::TestCase
|
class FakeSymlinkTest < Test::Unit::TestCase
|
||||||
include FakeFS
|
include FakeFS
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
require "test_helper"
|
||||||
require 'fakefs/safe'
|
|
||||||
require 'test/unit'
|
|
||||||
|
|
||||||
class FakeFSTest < Test::Unit::TestCase
|
class FakeFSTest < Test::Unit::TestCase
|
||||||
include FakeFS
|
include FakeFS
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
require "test_helper"
|
||||||
require 'fakefs/safe'
|
|
||||||
require 'test/unit'
|
|
||||||
|
|
||||||
class FakeFSSafeTest < Test::Unit::TestCase
|
class FakeFSSafeTest < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
|
3
test/test_helper.rb
Normal file
3
test/test_helper.rb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
||||||
|
require 'fakefs/safe'
|
||||||
|
require 'test/unit'
|
@ -3,8 +3,7 @@
|
|||||||
# USAGE
|
# USAGE
|
||||||
#
|
#
|
||||||
# $ ruby test/verify.rb | grep "not implemented"
|
# $ ruby test/verify.rb | grep "not implemented"
|
||||||
require 'fakefs/safe'
|
require "test_helper"
|
||||||
require 'test/unit'
|
|
||||||
|
|
||||||
class FakeFSVerifierTest < Test::Unit::TestCase
|
class FakeFSVerifierTest < Test::Unit::TestCase
|
||||||
(RealFile.methods - Class.new.methods).each do |name|
|
(RealFile.methods - Class.new.methods).each do |name|
|
||||||
|
Loading…
Reference in New Issue
Block a user