Sha256: 03829c36f61985cf55a1da670558783debcda564421c63380dadb8140a17b5a6

Contents?: true

Size: 709 Bytes

Versions: 5

Compression:

Stored size: 709 Bytes

Contents

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

describe Footnotes::Notes::StylesheetsNote do

  let(:note) {described_class.new(mock('controller', :response => mock('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

5 entries across 5 versions & 1 rubygems

Version Path
rails-footnotes-3.7.9 spec/notes/stylesheets_note_spec.rb
rails-footnotes-3.7.8 spec/notes/stylesheets_note_spec.rb
rails-footnotes-3.7.7 spec/notes/stylesheets_note_spec.rb
rails-footnotes-3.7.6 spec/notes/stylesheets_note_spec.rb
rails-footnotes-3.7.5 spec/notes/stylesheets_note_spec.rb