zoomifier/spec/zoomifier_helper_spec.rb

23 lines
600 B
Ruby
Raw Normal View History

require File.dirname(__FILE__) + '/spec_helper'
2008-11-24 04:41:10 +00:00
require File.dirname(__FILE__) + '/../../../../config/environment'
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
before(:each) do
2008-11-24 04:41:10 +00:00
@view = ActionView::Base.new
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
end