Class: RspecApiDocs::Helper

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_api_docs/helper.rb

Class Method Summary collapse

Class Method Details

.fileObject



2
3
4
5
# File 'lib/rspec_api_docs/helper.rb', line 2

def self.file
  root_path = Rails.root.to_s.gsub('/rails', '')
  file = File.join(root_path, "apiary.apib")
end

.running_api_specs?(config) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/rspec_api_docs/helper.rb', line 7

def self.running_api_specs?(config)
  files_to_run = config.instance_variable_get(:@files_or_directories_to_run)
  files_to_run == ["spec/controllers/api/"]
end