diff --git a/lib/lotus/action/session.rb b/lib/lotus/action/session.rb index e9f6607c..2e57bcfe 100644 --- a/lib/lotus/action/session.rb +++ b/lib/lotus/action/session.rb @@ -30,8 +30,6 @@ def self.included(action) end end - protected - # Gets the session from the request and expose it as an Hash. # # @return [Hash] the HTTP session from the request diff --git a/test/fixtures.rb b/test/fixtures.rb index 453a1812..7fc9daca 100644 --- a/test/fixtures.rb +++ b/test/fixtures.rb @@ -962,6 +962,8 @@ def call(params) self.headers.merge!('X-Custom' => 'OK') headers.merge!('Y-Custom' => 'YO') + self.session[:foo] = 'bar' + # PRIVATE # self.configuration # self.finish diff --git a/test/session_test.rb b/test/session_test.rb index e3de543f..58655b63 100644 --- a/test/session_test.rb +++ b/test/session_test.rb @@ -6,14 +6,14 @@ action = SessionAction.new action.call({'rack.session' => session = { 'user_id' => '23' }}) - action.__send__(:session).must_equal(session) + action.session.must_equal(session) end it 'returns empty hash when it is missing' do action = SessionAction.new action.call({}) - action.__send__(:session).must_equal({}) + action.session.must_equal({}) end it 'exposes session' do