require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Garterbelt::View, "Rails Style Helpers" do
describe 'inputs' do
describe '#input' do
it 'defaults to type of text'
end
describe 'checkbox' do
end
end
describe '#form' do
describe 'method option' do
describe ':put' do
it 'builds _method hidden input with the correct attribute'
it 'sets the form method attribute to post'
end
describe ':delete' do
it 'builds _method hidden input with the correct attribute'
it 'sets the form method attribute to post'
end
it 'defaults to :post when none is given'
it 'can be set to :get too'
it 'has that Rails fraud detector thingy when available'
end
end
describe '#image' do
describe 'class level image path' do
it 'has a default class image path /images'
it 'class level image path can be customized'
it 'class level image path is inherited'
end
it 'takes the file name as first argument constructs a full path for the img src'
describe 'alt text' do
it 'humanizes the file name by default'
it 'can be customize through options'
end
it 'takes other attributes'
describe 'expiration tagging' do
it 'includes one related to the file updated time in seconds'
end
end
describe '#auto_discovery' do
# auto_discovery_link_tag # =>
#
# auto_discovery_link_tag(:atom) # =>
#
# auto_discovery_link_tag(:rss, {:action => "feed"}) # =>
#
# auto_discovery_link_tag(:rss, {:action => "feed"}, {:title => "My RSS"}) # =>
#
# auto_discovery_link_tag(:rss, {:controller => "news", :action => "feed"}) # =>
#
# auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {:title => "Example RSS"}) # =>
#
end
describe '#script_include' do
# javascript_include_tag "xmlhr" # =>
#
#
# javascript_include_tag "xmlhr.js" # =>
#
#
# javascript_include_tag "common.javascript", "/elsewhere/cools" # =>
#
#
#
# javascript_include_tag "http://www.railsapplication.com/xmlhr" # =>
#
#
# javascript_include_tag "http://www.railsapplication.com/xmlhr.js" # =>
#
#
# javascript_include_tag :defaults # =>
#
#
# ...
#
#
# * = The application.js file is only referenced if it exists
#
# Though it's not really recommended practice, if you need to extend the default JavaScript set for any reason
# (e.g., you're going to be using a certain .js file in every action), then take a look at the register_javascript_include_default method.
#
# You can also include all javascripts in the javascripts directory using :all as the source:
#
# javascript_include_tag :all # =>
#
#
# ...
#
#
#
#
# Note that the default javascript files will be included first. So Prototype and Scriptaculous are available to
# all subsequently included files.
#
# If you want Rails to search in all the subdirectories under javascripts, you should explicitly set :recursive:
#
# javascript_include_tag :all, :recursive => true
#
# == Caching multiple javascripts into one
#
# You can also cache multiple javascripts into one file, which requires less HTTP connections to download and can better be
# compressed by gzip (leading to faster transfers). Caching will only happen if config.perform_caching
# is set to true (which is the case by default for the Rails production environment, but not for the development
# environment).
#
# ==== Examples
# javascript_include_tag :all, :cache => true # when config.perform_caching is false =>
#
#
# ...
#
#
#
#
# javascript_include_tag :all, :cache => true # when config.perform_caching is true =>
#
#
# javascript_include_tag "prototype", "cart", "checkout", :cache => "shop" # when config.perform_caching is false =>
#
#
#
#
# javascript_include_tag "prototype", "cart", "checkout", :cache => "shop" # when config.perform_caching is true =>
#