Testing helpers in Sinatra
How do you test your helper methods in a Sinatra::Base app?
1 2 3 4 5 6 7 | module FundAStache module Helpers def logged_in? false # you shall not pass... end end end |
Include them in your tests…
1 2 3 4 | class FundastacheUserTest < Test::Unit::TestCase include Rack::Test::Methods include FundAStache::Helpers ... |