KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm having problem making two requests to the same url in a rails integration test, with rspec it 'does something' do # get '/something', {:status=>'any_other'}, @header ## <<<<< this line causes problem! get '/something', {:status=>'ok'}, @header doc = Nokogiri::HTML(response.body) lis = doc.css('#the_id') lis.size.should == 1 lis[0].text.should include('anything') end If I make two requests to the same controller, the test seems to maintain the old response... In the above example, if I uncomment that line, the test breaks beacause it maintains the result of the first 'query' Is it a limitation of the test stack, or am I doing something wrong?
Tags (comma-separated)
Save Edits
Cancel