test/middleware/test_golden_middleware.rb in tracksperanto-2.9.5 vs test/middleware/test_golden_middleware.rb in tracksperanto-2.9.6
- old
+ new
@@ -1,19 +1,12 @@
# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
class GoldenMiddlewareTest < Test::Unit::TestCase
- def test_default_golden_set_to_false
- receiver = flexmock
- m = Tracksperanto::Middleware::Golden.new(receiver)
- assert_nil m.enabled
- end
- def test_golden_supports_hash_init
- receiver = flexmock
- m = Tracksperanto::Middleware::Golden.new(receiver, :enabled => true)
- assert_equal true, m.enabled
+ def test_action_description
+ assert_equal "Reset residual of all the trackers to zero", Tracksperanto::Middleware::Golden.action_description
end
def test_golden_bypasses_methods
receiver = flexmock
@@ -21,10 +14,10 @@
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
receiver.should_receive(:export_point).once.with(0, 100, 100, 0.0)
receiver.should_receive(:end_tracker_segment).once
receiver.should_receive(:end_export).once
- m = Tracksperanto::Middleware::Golden.new(receiver, :enabled => true)
+ m = Tracksperanto::Middleware::Golden.new(receiver)
m.start_export(120, 120)
m.start_tracker_segment("Tracker")
m.export_point(0, 100, 100, 0.56)
m.end_tracker_segment
m.end_export