How can I make Rack::Session::Pool work in a test using Sinatra and RSpec? -


how can make sessions work in rspec tests?

i have tried this:

describe "createnewlist_route_spec"   include rack::test::methods    use rack::session::pool    def app     @app ||= sinatra::application   end    "should save listitem database"      post '/addnewlistitem', {:item => 'testitem'}, :sessions => {:userid => '123'}    end end 

i'm noob sinatra, might on wrong track here...

this solved problem: http://gist.github.com/375973

not quite wanted, works in tests.


Comments

Popular posts from this blog

drupal - using views argument in the view tpl.php file -

php - Posting PHPBB Forum Thread/Post info in a website -

php - Add a blog by sending a mail to a certain emailadress -