Need help with program that uses a database.

8 views
Skip to first unread message

leam hall

unread,
Jun 30, 2016, 11:19:20 AM6/30/16
to rspec
A program being tested pulls data from a Sqlite database. The program itself runs, but the test currently fails with:

       SystemExit:
       could not open database: unable to open database file

The code layout is:
   lib/my_program.rb
   data/my_database.db
   spec/lib/my_program_spec.rb

A line of actual failing code is:

I've tried to set up spec/data/my_database.db  and to set $DATA_DIR << File.expand_path("../../data?, __FILE__)  but can't seem to get the syntax right.

Thanks!

Leam
Reply all
Reply to author
Forward
0 new messages