File: bq_spec.rb

package info (click to toggle)
tdiary 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,088 kB
  • sloc: ruby: 23,031; javascript: 1,029; xml: 325; makefile: 26; sh: 4
file content (23 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require File.expand_path('../plugin_helper', __FILE__)

describe "bq plugin w/" do
	def setup_bq_plugin( mode )
		fake_plugin(:bq) { |plugin|
			plugin.mode = mode
		}
	end

	describe "src only." do
		before do
			plugin = setup_bq_plugin('lateste')
			@body_snippet = plugin.bq('foo')
		end

		it { expect(@body_snippet).to eq(expected_html_body(
				src: 'foo')) }
	end

	def expected_html_body(options)
		%|<blockquote>\n<p>#{options[:src]}</p>\n</blockquote>\n|
	end
end