Sha256: bce199930088060a4227c4963f994346497948046383d6c2252d41aa116f57da
Contents?: true
Size: 631 Bytes
Versions: 4
Compression:
Stored size: 631 Bytes
Contents
require 'test_helper' class ActiveTrailTest < ActionView::TestCase test 'active trail in path' do set_path '/some-path/other-path' assert active_trail?('/') assert active_trail?('/some-path') end test 'active trail same as path' do set_path '/' assert active_trail?('/') set_path '/some-path' assert active_trail?('/some-path') end test 'active trail not in path' do set_path '/' assert !active_trail?('/some-path') set_path '/some-path' assert !active_trail?('/other-path') end private def set_path(path) self.request = OpenStruct.new(path: path) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tuning-0.3.3 | test/active_trail_test.rb |
tuning-0.3.2 | test/active_trail_test.rb |
tuning-0.3.0 | test/active_trail_test.rb |
tuning-0.2.4 | test/active_trail_test.rb |