Created
November 7, 2012 08:10
-
-
Save xirukitepe/4030135 to your computer and use it in GitHub Desktop.
Helper spec example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe EventsHelper do | |
describe "#link_to_event" do | |
it "displays the title, and formatted date" do | |
event = Event.new("Ruby Kaigi", Date.new(2010, 8, 27)) | |
# helper is an instance of ActionView::Base configured with the | |
# EventsHelper and all of Rails' built-in helpers | |
helper.link_to_event.should =~ /Ruby Kaigi, 27 Aug, 2010/ | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment