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
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,
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
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
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