Sha256: c81196609574870f0944ea43979087a9a513555f02e79b6ef1713f8d621835a7
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
require 'spec_helper' class FilesController < ApplicationController def index end end describe FilesController do render_views include Capybara::DSL def page Capybara::Node::Simple.new(response.body) end before :all do Footnotes.enabled = true end after :all do Footnotes.enabled = false end it 'includes stylesheets assets in the response' do get :index js_debug = first('fieldset#javascripts_debug_info div', visible: false) expect(js_debug).to have_selector('li a', visible: false, count: 1) expect(js_debug).to have_selector('li a', text: /foobar\.js/, visible: false) link = js_debug.first('a', visible: false) expect(link['href']).to eq("txmt://open?url=file://#{Rails.root.join('app', 'assets', 'javascripts', 'foobar.js')}&line=1&column=1") end it 'includes css assets in the response' do get :index css_debug = first('fieldset#stylesheets_debug_info div', visible: false) expect(css_debug).to have_selector('li a', visible: false, count: 1) expect(css_debug).to have_selector('li a', text: /foobar\.css/, visible: false) link = css_debug.first('a', visible: false) expect(link['href']).to eq("txmt://open?url=file://#{Rails.root.join('app', 'assets', 'stylesheets', 'foobar.css')}&line=1&column=1") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-footnotes-4.1.6 | spec/controllers/files_note_controller_spec.rb |