Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Relative gemfiles location breaks cucumber tests with aruba #5

Closed
ZenCocoon opened this Issue · 5 comments

2 participants

@ZenCocoon

I've described the general error at: http://stackoverflow.com/questions/6556709/gems-rake-tasks-to-use-current-location

However, the quick idea is that Appraisal use relative gemfiles path that doesn't seem to play nice with aruba

I've tried to get it as absolute path, but don't know how to get the current Rakefile location used to run rake appraisal from the Appraisal rake tasks.

@croaky
Owner

I tried changing the gemfile_root method of Appraisal::Appraisal to be:

::File.join(Dir.pwd, "gemfiles")

That passes the test suite and works for the first appraisal (trying it out on Clearance). However, the second appraisal it tries to run, it had a duplicated path:

/Users/lawless/dev/clearance/Users/lawless/dev/clearance/gemfiles/3.0.9.gemfile

So there's something about the process going on that I don't quite understand yet.

@ZenCocoon

Hmm weird behavior.

I've tried on my end with

def gemfile_root
  ::File.join(Dir.pwd, "gemfiles")
end

With rspec-subject-extensions it works like a charm with 2 appraisals (under MRI 1.8.7 and MRI 1.9.2)
However I've tried with Clearance as well and it fails at the first appraisal in my case.

I'll keep investigating to see what's going on.

@ZenCocoon

Ok, here's the catch. https://github.com/thoughtbot/clearance/blob/master/features/support/appraisal.rb#L4

If using ::File.join(Dir.pwd, "gemfiles") directly in appraisal, this is no longer required. As long as it can break compatibility, I think it's a nice update to make Appraisal usage even easier.

Tested with Clearance and works nicely.

@croaky
Owner

Good call. Made the changes to appraisal and clearance.

549f3fa
thoughtbot/clearance@ef95328

@croaky croaky closed this
@ZenCocoon

Sweet, thanks a lot for your help and work. Looking forward for the version bump ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.