Skip to content

Commit

Permalink
Add key_separator configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jrichardlai committed Sep 14, 2016
1 parent 0bd89ae commit f107f47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ TestsDoc.configure do |config|
# Folder name where the tests doc will be stored
config.doc_folder = 'api' # default: api

# Key separator between the path and the key
config.key_separator = '@' # default: @

# Add RSpec line number to the test doc
config.add_spec_file_number = false # default: true

Expand Down
1 change: 1 addition & 0 deletions lib/tests_doc/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def self.config(property, default = nil)
config :changes_whitelist_regexes, []
config :root_folder, "tests-doc"
config :doc_folder, "api"
config :key_separator, "@"
end

end
2 changes: 1 addition & 1 deletion lib/tests_doc/interaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def response_content
end

def file_path
[file_base_path, options.key.to_s].reject(&:blank?).compact.join('@') + '.md'
[file_base_path, options.key.to_s].reject(&:blank?).compact.join(TestsDoc.configuration.key_separator) + '.md'
end

def file_base_path
Expand Down

0 comments on commit f107f47

Please sign in to comment.