File: gist_spec.rb

package info (click to toggle)
tdiary-contrib 5.0.11-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,660 kB
  • sloc: ruby: 17,024; lisp: 546; xml: 451; php: 61; sql: 40; makefile: 18
file content (16 lines) | stat: -rw-r--r-- 497 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$:.unshift(File.dirname(__FILE__))
require 'spec_helper'

describe "gist plugin" do
	DUMMY_GIST_ID = 1234567890

	it 'should render javascript tag with specified gist-id' do
		plugin = fake_plugin(:gist)
		snippet = plugin.gist(DUMMY_GIST_ID)
		expected = (<<-EOS).chomp
<div class="gist_plugin"><script src="http://gist.github.com/1234567890.js"></script>
<noscript><a href="http://gist.github.com/1234567890">gist:1234567890</a></noscript></div>
		EOS
		expect(snippet).to eq(expected)
	end
end