Sha256: 58f58be5a0ab1b9bcc3ed5801d3360868970b524330da3c24bf77fc9bdad93e0

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

require 'test_helper'

class TrailTest < ActiveSupport::TestCase
  setup do
    Gretel.reset!
  end

  test "defaults" do
    assert_equal :trail, Gretel::Trail.trail_param
  end

  test "setting invalid store" do
    assert_raises ArgumentError do
      Gretel::Trail.store = :xx
    end
  end

  test "setting store options on main module" do
    assert_equal :trail, Gretel.trail_param
    Gretel.trail_param = :other_param
    assert_equal :other_param, Gretel::Trail.trail_param

    assert_equal Gretel::Trail::UrlStore, Gretel.trail_store
    Gretel.trail_store = :redis
    assert_equal Gretel::Trail::RedisStore, Gretel::Trail.store
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gretel-3.0.0.beta4 test/trails/trail_test.rb
gretel-3.0.0.beta3 test/trails/trail_test.rb