Skip to content

Commit

Permalink
Fixed specs
Browse files Browse the repository at this point in the history
  • Loading branch information
ayanko committed Feb 18, 2013
1 parent cdc410a commit d034802
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apps/test_rails_app.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'rails'
require 'action_controller/railtie'

module TestRailsApp
Expand Down Expand Up @@ -33,3 +32,5 @@ def show
end
end
end

Rails.logger = Logger.new('/dev/null')
4 changes: 2 additions & 2 deletions lib/rack_session_access/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def call(env)

# List session data
def show(request)
# call inspect because session can be lazy loaded
request.env[@key].inspect
# force load session because it can be lazy loaded
request.env[@key].delete(:rack_session_access_force_load_session)

case File.extname(request.path)
when ".raw"
Expand Down
4 changes: 2 additions & 2 deletions spec/middleware_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
end

context "rails application" do
background { Capybara.app = TestRackApp }
background { Capybara.app = TestRailsApp::Application }
include_examples "common scenarios"
include_examples "rails scenarios"
end
Expand All @@ -168,7 +168,7 @@
end

context "rails application" do
background { Capybara.app = TestRackApp }
background { Capybara.app = TestRailsApp::Application }
include_examples "common scenarios"
include_examples "rails scenarios"
end
Expand Down

0 comments on commit d034802

Please sign in to comment.