Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix some now glaringly obvious bugs in the test

  • Loading branch information...
commit 56d335d69151a818f53b02e1c659adf5d99c2889 1 parent 89cdcd6
Tim Lucas authored

Showing 1 changed file with 7 additions and 10 deletions. Show diff stats Hide diff stats

  1. +7 10 test_example.rb
17 test_example.rb
@@ -24,8 +24,6 @@ class Sinatra::ToadHopper::TestExample < Test::Unit::TestCase
24 24 def app; Sinatra::Application end
25 25
26 26 def setup
27   - app.set :environment, :production
28   -
29 27 @toadhopper = ::ToadHopper.new("")
30 28 stub(::ToadHopper).new do |api_key|
31 29 @api_key = api_key
@@ -50,14 +48,13 @@ def test_reported_error
50 48 end
51 49
52 50 def test_options
53   - assert_equal ENV.to_hash, @options[:environment]
54   - assert_equal "http://example.org/register", @options[:url]
55   - assert @options[:request]
56   - assert @options[:request].respond_to?(:params)
57   - assert @options[:framework_env] = "production"
58   - assert @options[:project_root] = app.root
59   - assert @options[:session] = {:user_id => 42}
60   - assert @options[:notifier_name] = "toadhopper-sinatra"
  51 + assert_equal ENV.to_hash, @options[:environment]
  52 + assert_equal "http://example.org/register", @options[:url]
  53 + assert_equal({"name"=>"Billy", "password"=>"Bob"}, @options[:request].params)
  54 + assert_equal "production", @options[:framework_env]
  55 + assert_equal app.root, @options[:project_root]
  56 + assert_equal({:user_id => 42}, @options[:session])
  57 + assert_equal "toadhopper-sinatra", @options[:notifier_name]
61 58 end
62 59
63 60 def test_header_options

0 comments on commit 56d335d

Please sign in to comment.
Something went wrong with that request. Please try again.