Jay, trying to remember...

Testing helpers in Sinatra

How do you test your helper methods in a Sinatra::Base app?

module FundAStache
  module Helpers    
    def logged_in?
      false # you shall not pass...
    end
  end
end

Include them in your tests…

class FundastacheUserTest < Test::Unit::TestCase
  include Rack::Test::Methods
  include FundAStache::Helpers
  ...

comments powered by Disqus