Class: Autotest::Rails
- Inherits:
-
Object
- Object
- Autotest::Rails
- Defined in:
- lib/calnet_authenticated/autotest.rb
Instance Method Summary collapse
-
#run_with_calnet_authenticated ⇒ Object
Need both the mapping and the extra files.
Instance Method Details
#run_with_calnet_authenticated ⇒ Object
Need both the mapping and the extra files
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/calnet_authenticated/autotest.rb', line 6 def run_with_calnet_authenticated add_exception %r%config/% add_exception %r%versions/% add_exception %r%\.git/% self.extra_files << File.(File.join( File.dirname(__FILE__),'/../../test/unit/calnet/')) # self.extra_files << File.expand_path(File.join( # File.dirname(__FILE__),'/../../test/functional/calnet/')) # add_mapping( # %r{^#{File.expand_path(File.join(File.dirname(__FILE__),'/../../test/'))}/(unit|functional)/calnet/.*_test\.rb$} # ) do |filename, _| # filename # end add_mapping( %r{^#{File.(File.join(File.dirname(__FILE__),'/../../test/'))}/unit/calnet/.*_test\.rb$} ) do |filename, _| filename end ## # This stops the ... # # Unable to map class Ccls::IdentifierTest to a file # Unable to map class Ccls::SubjectTest to a file # # By default autotest is expecting all the namespaces to end with Test # ie. CclsTest::IdentifierTest # Could have renamed the dir, I suppose. # Dir[File.join(File.dirname(__FILE__),'/../../test/unit/**/*rb')].each do |f| # the condition isn't as important as grabbing "calnet/test_file_name.rb" for camelcasing if f =~ /test\/unit\/(calnet\/.*)\.rb/ self.extra_class_map[$1.camelcase] = File.(f) end end # Dir[File.join(File.dirname(__FILE__),'/../../test/functional/**/*rb')].each do |f| # if f =~ /test\/functional\/(calnet\/.*)\.rb/ # self.extra_class_map[$1.camelcase] = File.expand_path(f) # end # end run_without_calnet_authenticated end |