Skip to content

Instantly share code, notes, and snippets.

@dnordstrom
Created December 5, 2011 19:29
Show Gist options
  • Save dnordstrom/1434904 to your computer and use it in GitHub Desktop.
Save dnordstrom/1434904 to your computer and use it in GitHub Desktop.
String testing
require_relative "../../lib/coffeeshop"
require_relative "../spec_helper"
include CoffeeShop
include SpecHelper
include MarkupHelper
describe MarkupHelper do
before :all do
@base = CoffeeShop::Application.base
setup
end
it "should output an anchor tag linking to index page" do
markup = link_to("Home", :index)
(
markup.include?("href=\"#{@base}/page/index\"") &&
markup.include?("title=\"Home\"") &&
markup.include?(">Home</a>")
).should be_true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment