require 'spec_helper' describe TopHat::StylesheetHelper do before(:each) do ENV["RAILS_ASSET_ID"] = '' public_dir = File.join(File.dirname(__FILE__), 'public') @helpers = ActionController::Base.helpers @helpers.config.perform_caching = false @helpers.config.assets_dir = public_dir @helpers.config.javascripts_dir = "#{public_dir}/javascripts" @helpers.config.stylesheets_dir = "#{public_dir}/stylesheets" @template = ActionView::Base.new @stylesheet = "ie.css" end it "should define IE conditionals" do @template.ie_5_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_6_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_7_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_8_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_9_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined IE conditional with greater than operator" do @template.ie_5_conditional(:gt) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional(:gt) { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined IE conditional with greater than or equal to operator" do @template.ie_5_conditional(:gte) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional(:gte) { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined IE conditional with ! operator" do @template.ie_5_conditional(:not) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional(:not) { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined IE conditional with less than operator" do @template.ie_5_conditional(:lt) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional(:lt) { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined IE conditional with less than or equal to operator" do @template.ie_5_conditional(:lte) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional(:lte) { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined IE conditional with equal to operator" do @template.ie_5_conditional(:eq) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_5_5_conditional(:eq) { @template.stylesheet_link_tag(@stylesheet) }.should == "" end it "should render defined conditionals for other browsers" do @template.opera_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.webkit_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.webkit_conditional(:eq) { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.gecko_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_mac_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.konqueror_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.ie_mobile_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.psp_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.net_front_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" @template.mobile_safari_conditional { @template.stylesheet_link_tag(@stylesheet) }.should == "" end end