Sha256: 8c22314ecd8d782cb4856e52c2d670f42e9e233a86dd8d965c8568b8588dfdbb
Contents?: true
Size: 798 Bytes
Versions: 2
Compression:
Stored size: 798 Bytes
Contents
ENV["RACK_ENV"] = "test" require "bundler/setup" require "test/unit" require "contest" require "rack/test" require "dotenv" require_relative "support/rack_test_assertions" require_relative "../app" Dotenv.load class Test::Unit::TestCase # Syntactic sugar for defining a memoized helper method. def self.let(name, &block) ivar = "@#{name}" self.class_eval do define_method(name) do if instance_variable_defined?(ivar) instance_variable_get(ivar) else value = self.instance_eval(&block) instance_variable_set(ivar, value) end end end end end class Rack::Test::TestCase < Test::Unit::TestCase include Rack::Test::Methods include Rack::Test::Assertions private def app Sinatra::Application end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hoboken-0.0.1 | lib/hoboken/templates/test/test_helper.rb.tt |
hoboken-0.0.1.beta3 | lib/hoboken/templates/test/test_helper.rb.tt |