28 April 2008

Specing actions which have session management turned off

The spec:


describe "rss action" do
before :each do
get :rss
end

it "should turn off session management" do
request.session_options.should be_false
end

end


The controller:


# turn off session management for only the atom and rss actions.
session :off, :only => %w(atom rss)
def rss
# ...
end