public
Description: Use autotest on your rails plugin development.
Homepage:
Clone URL: git://github.com/metaskills/autotest_railsplugin.git
autotest_railsplugin / railsplugin_rspec.rb
100644 30 lines (19 sloc) 0.797 kb
1
2
3
4
5
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
require 'autotest/rspec'
 
class Autotest::RailspluginRspec < Autotest::Rspec
 
  def initialize
    super
    
    # Default libs for autospec. So far they suit us just fine.
    # self.libs = %w[. lib spec].join(File::PATH_SEPARATOR)
    
    # Ignore these directories in the plugin.
    add_exception %r%^\./(?:autotest|tasks)%
# Ignore these ruby files in the root of the plugin folder.
add_exception %r%^\./(install|uninstall)\.rb$%
# Ignore these misc files in the root of the plugin folder.
add_exception %r%^\./(.*LICENSE|Rakefile|README.*|CHANGELOG.*)$%i
# Ignore any log file.
add_exception %r%.*\.log$%
add_mapping %r%^spec/(boot|helper|factories)\.rb|database.yml% do
files_matching %r%^spec/.*_spec\.rb$%
    end
    
  end
  
end