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"
|
||||
task :test do
|
||||
Dir['test/**/*_test.rb'].each { |file| require file }
|
||||
|
@ -1,6 +1,4 @@
|
||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
||||
require 'fakefs/safe'
|
||||
require 'test/unit'
|
||||
require "test_helper"
|
||||
|
||||
class FakeFileTest < Test::Unit::TestCase
|
||||
include FakeFS
|
||||
|
@ -1,6 +1,4 @@
|
||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
||||
require 'fakefs/safe'
|
||||
require 'test/unit'
|
||||
require "test_helper"
|
||||
|
||||
class FakeSymlinkTest < Test::Unit::TestCase
|
||||
include FakeFS
|
||||
|
@ -1,6 +1,4 @@
|
||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
||||
require 'fakefs/safe'
|
||||
require 'test/unit'
|
||||
require "test_helper"
|
||||
|
||||
class FakeFSTest < Test::Unit::TestCase
|
||||
include FakeFS
|
||||
|
@ -1,6 +1,4 @@
|
||||
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
||||
require 'fakefs/safe'
|
||||
require 'test/unit'
|
||||
require "test_helper"
|
||||
|
||||
class FakeFSSafeTest < Test::Unit::TestCase
|
||||
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
|
||||
#
|
||||
# $ ruby test/verify.rb | grep "not implemented"
|
||||
require 'fakefs/safe'
|
||||
require 'test/unit'
|
||||
require "test_helper"
|
||||
|
||||
class FakeFSVerifierTest < Test::Unit::TestCase
|
||||
(RealFile.methods - Class.new.methods).each do |name|
|
||||
|
Loading…
Reference in New Issue
Block a user