2008-11-22 00:05:53 +00:00
|
|
|
require File.dirname(__FILE__) + '/spec_helper'
|
2008-11-24 04:41:10 +00:00
|
|
|
require File.dirname(__FILE__) + '/../../../../config/environment'
|
2008-11-22 00:05:53 +00:00
|
|
|
require 'zoomifier_helper'
|
|
|
|
|
|
|
|
describe Zoomifier::ViewHelpers do
|
2008-11-24 04:41:10 +00:00
|
|
|
before(:all) do
|
|
|
|
ActionView::Base.send :include, Zoomifier::ViewHelpers
|
|
|
|
end
|
|
|
|
|
2008-11-22 00:05:53 +00:00
|
|
|
before(:each) do
|
2008-11-24 04:41:10 +00:00
|
|
|
@view = ActionView::Base.new
|
2008-11-22 00:05:53 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "should respond to zoomify_image_tag" do
|
|
|
|
@view.should respond_to(:zoomify_image_tag)
|
|
|
|
end
|
2008-11-24 04:41:10 +00:00
|
|
|
|
|
|
|
it "should generate the zoomify markup" do
|
|
|
|
@view.zoomify_image_tag('foo.jpg', { :id => 'foo' }).should ==
|
|
|
|
'<div id="foo"><img src="foo.jpg" alt=""/></div>'
|
|
|
|
end
|
2008-11-22 00:05:53 +00:00
|
|
|
end
|