Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (20 sloc) 0.511 kb
require 'notify_me'
require 'test/unit'
require 'rack/test'
set :environment, :production
class NotifyMeTestProduction < Test::Unit::TestCase
include Rack::Test::Methods
def app
Sinatra::Application
end
def test_root_path_renders_analytics
set :analytics_id, 'UA-XXXXX-8'
get '/'
assert last_response.body.include?('UA-XXXXX-8')
end
def test_root_path_no_analytics
set :analytics_id, 'UA-XXXXX-X'
get '/'
assert !last_response.body.include?('UA-XXXXX-X')
end
end
Jump to Line
Something went wrong with that request. Please try again.