Sha256: a1eff43389efed974a27cfc051fe6913e5b9fb681af54d0f7231fee306d290ac

Contents?: true

Size: 663 Bytes

Versions: 10

Compression:

Stored size: 663 Bytes

Contents

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

describe Footnotes::Notes::JavascriptsNote do
  let(:note) {described_class.new(double('controller', :response => double('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

10 entries across 10 versions & 1 rubygems

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