Sha256: 59ec0f72aabe2c77aa6b83a9fb1b792b144152e0d90415a53f790d1a67262ea6
Contents?: true
Size: 1.27 KB
Versions: 3
Compression:
Stored size: 1.27 KB
Contents
require 'test/unit' require File.dirname(__FILE__) + '/../lib/staticmatic' class HelpersTest < Test::Unit::TestCase include StaticMatic::Helpers def setup @base_dir = File.dirname(__FILE__) + '/sandbox/test_site' end def test_should_generate_stylesheet_links assert_match "href=\"stylesheets\/application.css\"", stylesheets end def test_should_autolink_page expected_output = %q{<a href="test.html">Test</a>} assert_match expected_output, link("Test") end def test_should_generate_tag_with_block expected_output = %q{<a href="test.html" title="My Test Link">Test</a>} assert_match expected_output, tag(:a, :href => "test.html", :title => 'My Test Link') { "Test" } end def test_should_generate_tag expected_output = %q{<br/>} assert_match expected_output, tag(:br) end def test_should_urlify_string assert_equal "stephens_haml_and_sass_project", urlify("Stephen's Haml & Sass Project") end def test_should_generate_input expected_output = %q{<input type="text" value="blah" name="test"/>} assert_match expected_output, text_field("test", "blah") end def test_should_generate_js_links expected_output = %q{src="javascripts/test.js"} assert_match expected_output, javascripts('test') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
staticmatic-0.7.0 | test/helpers_test.rb |
staticmatic-0.8.1 | test/helpers_test.rb |
staticmatic-0.7.1 | test/helpers_test.rb |