Skip to content
This repository has been archived by the owner on Oct 4, 2018. It is now read-only.

Commit

Permalink
Fix JpInstrumentedServer AliveSince call - missing @
Browse files Browse the repository at this point in the history
Also added test.
  • Loading branch information
fredemmott committed May 16, 2011
1 parent 52c9860 commit 2554556
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion classes/jp_instrumented_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize options = {}
# Readers

def start_time
server.aliveSince
@server.aliveSince
end

def pools
Expand Down
5 changes: 5 additions & 0 deletions tests/classes/tc_jp_instrumented_server_isolated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ def setup
@jp = JpInstrumentedServer.new pools: {@test_pool => {}}, jp_server: @server
end

def test_start_time_delegates
@server.expects(:aliveSince).returns(1337)
assert_equal 1337, @jp.start_time
end

def test_pools
assert_equal [@test_pool], @jp.pools
end
Expand Down

0 comments on commit 2554556

Please sign in to comment.