Does rspec ignore skip_before_filter?

We have a strange problem. In the application controller, we have a set before_filterthat requires authentication with deviseand redirects, if necessary, the login page.

In our library controller, we will skip this one before_filter.

skip_before_filter :authenticate_user!, :only => :show

When we run a simple functional test with capybaraand rspec, the test fails.

it "should get only english articles within the category 'computers'" do
    visit '/en/library/computers'
    page.should have_content('computers')
end

It does not seem to miss this filter. The content of the page is on the login page.

When we run this with help rails server, it works great.

Any ideas why he is behaving this way or what to look for to solve this problem?

UPDATE:

It might be worth adding that this only happens on Linux. On macOS 10.7 with the “same” setting, it works fine.

Controller Code:

class Library::CategoriesController < ApplicationController
  skip_before_filter :authenticate_user!, :only => [:show]

  # GET /categories/1
  # GET /categories/1.json
  def show

    @categories = Category.all
    @category = Category.find(params[:id])

    @articles = @category.articles.where(:locale => I18n.locale)
    respond_to do |format|
      format.html # show.html.erb
    end
  end
end

Application_controller ( set_i18n_locale_from_url):

class ApplicationController < ActionController::Base
  protect_from_forgery
  before_filter :set_i18n_locale_from_url, :authenticate_user!
end

namespace :library do
  get '/' => 'library#index', :as => 'library'
  resources :categories, :path => '', :only => [:show]
  resources :categories, :path => '', :only => []  do
    resources :articles, :path => '', :only => [:show]
  end
end
+5
2

, , , , "" /en/library/computers "" show . , show, URL-, :

visit library_path('computers')

( 'blah') show, , , . , , - , before_filters.

UPDATE:

, "" . , , :

resources :libraries do
  member do
    get :computers
  end
end

:

def computers
  @categories = Category.all
end

skip_before_filter, :

+3

, - , . , Linux .

before_filter , :

 1) Categories when user requests the category page 
      GET /en/library/computers 
        should get only english articles within the category computers
    Failure/Error: page.should have_content(@english_articles[0].title)
      expected there to be content "article 1 en" in "Bibliothek\nAdmin\nSign up\nLogin\n\n\n\n\n\n\n\n\nHome\n>\n\n\nLibrary\n>\n\n\Computer\n>\n\nThe spine\n\n\n\n\n\n\n\n\n\nComputer\n\n\n\n\n\n\n\n\n\n\n\n\nComputer\n\n\n\narticle 6 de\n\ncontent_6\n\n\narticle 7 de\n\ncontent_7\n\n\narticle 8 de\n\ncontent_8\n\n\narticle 9 de\n\ncontent_9\n\n\narticle 10 de\n\ncontent_10"
    # ./spec/requests/categories_spec.rb:20:in `block (4 levels) in <top (required)>'
+1

All Articles