Sha256: 98856cc753b723aa61ebe9931bbe2dde57e203680a7351c00e1e0e33030c3b1c

Contents?: true

Size: 659 Bytes

Versions: 5

Compression:

Stored size: 659 Bytes

Contents

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

describe Footnotes::Notes::JavascriptsNote do
  let(:note) {described_class.new(mock('controller', :response => mock('body', :body => '')))}
  subject {note}

  it {should be_valid}

  it "should return js links from html after #scan_text mehtod call" do
    subject.send(:scan_text, HTML_WITH_JS).should eql ['/javascripts/all.js', '/javascripts/jquery.js']
  end
end

HTML_WITH_JS = <<-EOF
  <script cache="false" src="/javascripts/all.js?1315913920" type="text/javascript"></script>
  <script cache="false" src="/javascripts/jquery.js?1315913920" type="text/javascript"></script>
EOF

Version data entries

5 entries across 5 versions & 1 rubygems

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