|
Revision 16782, 485 bytes
(checked in by kakutani, 4 months ago)
|
|
platform/tdiary/plugin/gist.rb, platform/tdiary/spec/gist_spec.rb: added <noscript> and <div> tag.
|
| Line | |
|---|
| 1 | $:.unshift(File.dirname(__FILE__)) |
|---|
| 2 | require 'spec_helper' |
|---|
| 3 | |
|---|
| 4 | describe "gist plugin" do |
|---|
| 5 | DUMMY_GIST_ID = 1234567890 |
|---|
| 6 | |
|---|
| 7 | it 'should render javascript tag with specified gist-id' do |
|---|
| 8 | plugin = fake_plugin(:gist) |
|---|
| 9 | snippet = plugin.gist(DUMMY_GIST_ID) |
|---|
| 10 | expected = (<<-EOS).chomp |
|---|
| 11 | <div class="gist"><script src="http://gist.github.com/1234567890.js"></script> |
|---|
| 12 | <noscript><a href="http://gist.github.com/1234567890">gist:1234567890</a></noscript></div> |
|---|
| 13 | EOS |
|---|
| 14 | snippet.should == expected |
|---|
| 15 | end |
|---|
| 16 | end |
|---|