[rspec-devel] [ rspec-Patches-12817 ] Cannot include same shared behaviour when required with absolute paths.
noreply at rubyforge.org
noreply at rubyforge.org
Sat Aug 4 09:10:17 EDT 2007
Patches item #12817, was opened at 2007-08-04 13:10
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=12817&group_id=797
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Ian Leitch (idl)
Assigned to: Nobody (None)
Summary: Cannot include same shared behaviour when required with absolute paths.
Initial Comment:
When trying to require a file containing a shared behavior with an absolute path different from the first require, RSpec raises an ArgumentError.
Due to the fact that we run 'rake spec' from the base of our Rails apps, all require statements in our specs are prefixed with File.dirname(__FILE__), e.g.:
require File.dirname(__FILE__) + '/../../spec_helper'
require File.dirname(__FILE__) + '/../email_template_view_helper'
Here email_template_view_helper contains a shared helper, yet when included by different specs IN DIFFERENT DIRECTORIES, the ArgumentError is raised.
The attached patch fixes this issue.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=12817&group_id=797
More information about the rspec-devel
mailing list