Re: [rspec-users] How to specify current directory for specs?

2010-11-12 Thread Daniel Lidström
On 10 Nov, 22:50, Rhett Sutphin wrote: > Hi Daniel, > [...] > As an alternative, you might also consider having a helper like this: > > # again, in spec/spec_helper.rb > def spec_path(path) >   File.expand_path("../spec", __FILE__) > end > > which you would use like so: > > book = Book.new spec_pa

Re: [rspec-users] How to specify current directory for specs?

2010-11-10 Thread Rhett Sutphin
Hi Daniel, On Nov 10, 2010, at 2:59 PM, Daniel Lidström wrote: > Hi Zach, > > thanks for your detailed answer. I think I need some clarifications: I > am not using Rails, I have a regular ruby project. When I say I need > to read a file, I am talking about a binary file with Othello > positions,

Re: [rspec-users] How to specify current directory for specs?

2010-11-10 Thread Daniel Lidström
Hi Zach, thanks for your detailed answer. I think I need some clarifications: I am not using Rails, I have a regular ruby project. When I say I need to read a file, I am talking about a binary file with Othello positions, not a spec helper. It is not a file I can 'require-in'. Sorry for the confus

Re: [rspec-users] How to specify current directory for specs?

2010-11-09 Thread Zach Dennis
On Tue, Nov 9, 2010 at 1:14 PM, Daniel Lidström wrote: > Hello, > > I'd like to know if it's possible to specify what directory to use as > the current directory when executing the specifications. My specs are > in spec/ and I have some data in spec/data that I want to read from > one of the spec

[rspec-users] How to specify current directory for specs?

2010-11-09 Thread Daniel Lidström
Hello, I'd like to know if it's possible to specify what directory to use as the current directory when executing the specifications. My specs are in spec/ and I have some data in spec/data that I want to read from one of the specs: spec/book_spec.rb require 'book' describe Book do it "should