Permalink
Browse files

Support 1.8.7 caller format

  • Loading branch information...
1 parent 1a32e32 commit 5e0e8174eea688f5a8216e862cc8eec3ff009d47 @oestrich committed Mar 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rspec_api_documentation/dsl.rb
View
2 lib/rspec_api_documentation/dsl.rb
@@ -65,7 +65,7 @@ def scope_parameters(scope, keys)
def example_request(description, params = {}, &block)
file_path = caller.first[0, caller.first =~ /:/]
- location = caller.first[0, caller.first =~ /:in/]
+ location = caller.first[0, caller.first =~ /(:in|$)/]
location = RSpec::Core::Formatters::BaseFormatter::relative_path(location)
example description, :location => location, :file_path => file_path do

0 comments on commit 5e0e817

Please sign in to comment.