module RSpec::Rails module App module Dirs def app_dir File.join(::Rails.root, 'app') end def config_dir File.join(::Rails.root, 'config') end def db_dir File.join(::Rails.root, 'db') end def locale_dir File.join(::Rails.root, 'public') end def model_dir File.join(app_dir, 'models') end def controller_dir File.join(app_dir, 'controllers') end def migration_dir File.join(db_dir, 'migrations') end def helper_dir File.join(app_dir, 'helpers') end def view_dir File.join(app_dir, 'views') end def initializer_dir File.join(config_dir, 'initializers') end def migration_dir File.join(db_dir, 'migrations') end def locale_dir File.join(config_dir, 'locales') end def stylesheet_dir File.join(public_dir, 'stylesheets') end def javascript_dir File.join(public_dir, 'javascripts') end end module Files def all FileList["#{::Rails.root}/**/*.rb"] end def app_files FileList["#{::Rails.root}/app/**/*.rb"] end def model_files FileList["#{::Rails.root}/app/models/**/*.rb"] end def controller_files FileList["#{::Rails.root}/app/controllers/**/*.rb"] end def helper_files FileList["#{::Rails.root}/app/helpers/**/*.rb"] end def view_files FileList["#{::Rails.root}/app/views/**/*"] end def view_files_html FileList["#{::Rails.root}/app/views/**/*.html*"] end def view_files_haml FileList["#{::Rails.root}/app/views/**/*.haml*"] end def initializer_files FileList["#{::Rails.root}/config/initializers/**/*.rb"] end def migration_files FileList["#{migration_dir}/**/*.rb"] end def locale_files FileList["#{::Rails.root}/config/locales/**/*.yml"] end def javascript_files FileList["#{javascript_dir}/**/*.js"] end def css_files FileList["#{stylesheet_dir}/**/*.css"] end def sass_files FileList["#{stylesheet_dir}/**/*.css"] end end end end