scottcreynolds / rack-test-rspec-stub-session

example of stubbing session in rack-test for rspec. probably don't test sessions that much though?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example for students in Flatiron School Ruby Bootcamp - Unmaintained/Possibly Out of Date

The idea here is to stub session and access it in an RSpec spec, however, the real suggestion is that if you're testing against session you're probably making a brittle test that knows too much about too much and should maybe be testing at a higher level, like that the result of some session-based decision shows up on a page or in a response.

About

example of stubbing session in rack-test for rspec. probably don't test sessions that much though?


Languages

Language:Ruby 100.0%