Sha256: 763e63a57b63cae54427ec2d63ccc7889362ae554bb38d63162747e3dd8c1805
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
require 'test_helper' class ActiveTrailTest < ActionView::TestCase test "return true if path is in active trail" do set_path '/some-path/other-path' assert active_trail?('/') assert active_trail?('/some-path') end test "return true if path is the same as active trail" do set_path '/' assert active_trail?('/') set_path '/some-path' assert active_trail?('/some-path') end test "return false if path is not in active trail" 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tuning-0.2.3 | test/active_trail_test.rb |