RSpec & ActiveRecord without Rails


I’m building a Gem which should run a server in the background, since
have only one page, I chose Sinatra but I can’t live without
(Who can, heh?) so I chose to use it as the ORM for the project, however
ran into a few issues running the tests because the database doesn’t
seem to
be emptied up before each example, so I added a bit of a hack in the
config.before(:each) of Rspec (code
to empty it by hand before each example.

I tried include most of rspec/rails (code
same file as above), only the code related to models, I set
config.use_transactional_fixtures to true and false, it doesn’t seem to
help, how is it done in Rails? I couldn’t find the code responsible for

Best Regards,
Wael N.

Wal Nasreddine
mobile :
agence : 09.70.444.236

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs