Sha256: b29f8f8fc07fd365222851fe03f7228af0c6792e09a714f94bd5555b8c5c9ecc

Contents?: true

Size: 713 Bytes

Versions: 10

Compression:

Stored size: 713 Bytes

Contents

require 'spec_helper'
require "rails-footnotes/notes/stylesheets_note"

describe Footnotes::Notes::StylesheetsNote do

  let(:note) {described_class.new(double('controller', :response => double('body', :body => '')))}
  subject {note}

  it {should be_valid}

  it "should return css link from html text after #scan_text call" do
    subject.send(:scan_text, HTML_WITH_CSS).should eql ['/stylesheets/compiled/print.css', '/stylesheets/compiled/print.css']
  end
end

HTML_WITH_CSS = <<-EOF
  <link href="/stylesheets/compiled/print.css?1315913920" media="print" rel="stylesheet" type="text/css" />'
  '<link href="/stylesheets/compiled/print.css?1315913920" media="print" rel="stylesheet" type="text/css" />'
EOF

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails-footnotes-4.1.6 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.1.5 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.1.4 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.1.3 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.1.2 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.1.1 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.1.0 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.0.2 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.0.1 spec/notes/stylesheets_note_spec.rb
rails-footnotes-4.0.0 spec/notes/stylesheets_note_spec.rb