diff --git a/lib/rspec_api_documentation/views/markup_example.rb b/lib/rspec_api_documentation/views/markup_example.rb index 70e0dc4a..b47729d9 100644 --- a/lib/rspec_api_documentation/views/markup_example.rb +++ b/lib/rspec_api_documentation/views/markup_example.rb @@ -19,7 +19,7 @@ def respond_to?(method, include_private = false) end def dirname - resource_name.downcase.gsub(/\s+/, '_').gsub(":", "_") + resource_name.to_s.downcase.gsub(/\s+/, '_').gsub(":", "_") end def filename diff --git a/lib/rspec_api_documentation/writers/combined_text_writer.rb b/lib/rspec_api_documentation/writers/combined_text_writer.rb index 454711a8..0d81df94 100644 --- a/lib/rspec_api_documentation/writers/combined_text_writer.rb +++ b/lib/rspec_api_documentation/writers/combined_text_writer.rb @@ -44,7 +44,7 @@ def initialize(example) end def resource_name - example.resource_name.downcase.gsub(/\s+/, '_') + example.resource_name.to_s.downcase.gsub(/\s+/, '_') end def description diff --git a/lib/rspec_api_documentation/writers/json_writer.rb b/lib/rspec_api_documentation/writers/json_writer.rb index 2ba099cb..e9b9db96 100644 --- a/lib/rspec_api_documentation/writers/json_writer.rb +++ b/lib/rspec_api_documentation/writers/json_writer.rb @@ -74,7 +74,7 @@ def respond_to?(method, include_private = false) end def dirname - resource_name.downcase.gsub(/\s+/, '_') + resource_name.to_s.downcase.gsub(/\s+/, '_') end def filename