Sha256: e00ee54d179b463483b2d2c1272de5f99a3e54810abe26e7a25f6fc355195f37
Contents?: true
Size: 547 Bytes
Versions: 1
Compression:
Stored size: 547 Bytes
Contents
require 'test_helper' class TestController < ActionController::TestCase def setup @controller = MyController.new end def test_header_included_in_request Sasha::Git.expects(:current_sha).twice.returns('ABC123ABC123') get 'index' assert_equal 'ABC123ABC123', response.headers[Sasha::HEADER_NAME] end def test_warning Sasha::Git.expects(:current_sha).twice.returns(nil) @controller.expects(:warn).once.with(instance_of(String)) get 'index' assert_equal nil, response.headers[Sasha::HEADER_NAME] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sasha-0.1.1 | test/unit/test_controller.rb |