启动css映射破坏请求rspec



我有一个用于简单请求的默认rspec

  describe "GET /clients" do
    it "works! (now write some real specs)" do
      get clients_path
      expect(response).to have_http_status(200)
    end
  end

当应用程序布局尝试获取样式表时,此操作失败:

ActionView::Template::Error: Invalid CSS after "...":3,"sources":[": expected "|", was ""bootstrap.css"..."
  (in ...:/.../app/assets/stylesheets/application.css)
(sass):1
./app/views/layouts/application.html.erb:13:in `_app_views_layouts_application_html_erb___320761601_41133324'
./spec/requests/clients_spec.rb:11:in `block (3 levels) in <top (required)>'
-e:1:in `load'
-e:1:in `<main>'

我猜它正试图将bootstrap.css.mas.css渲染为css?有办法解决这个问题吗?

更新:包括application.css

 /*
 *= require_tree .
 *= require_self
 *= require bootstrap.min
 *= require custom
 *= require table_sort
 *= require bootstrap-multiselect
 */

@font-face {
    font-family: 'Glyphicons Halflings';
    src: url('/assets/glyphicons-halflings-regular.eot');
    src: url('/assets/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
    url('/assets/glyphicons-halflings-regular.woff') format('woff'),
    url('/assets/glyphicons-halflings-regular.ttf') format('truetype'),
    url('/assets/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

删除bootstrap.css.map文件解决了这个问题。

最新更新