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

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -