Module: FriendlyId::Test::Generic

Defined in:
lib/friendly_id/test.rb

Overview

Tests for any model that implements FriendlyId. Any test that tests model features should include this module.

Instance Method Summary collapse

Instance Method Details

#create_methodObject

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/friendly_id/test.rb', line 39

def create_method
  raise NotImplementedError
end

#find_methodObject

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/friendly_id/test.rb', line 35

def find_method
  raise NotImplementedError
end

#instanceObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/friendly_id/test.rb', line 23

def instance
  raise NotImplementedError
end

#klassObject

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/friendly_id/test.rb', line 27

def klass
  raise NotImplementedError
end

#other_classObject

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/friendly_id/test.rb', line 31

def other_class
  raise NotImplementedError
end

#setupObject



15
16
17
# File 'lib/friendly_id/test.rb', line 15

def setup
  klass.send delete_all_method
end

#teardownObject



19
20
21
# File 'lib/friendly_id/test.rb', line 19

def teardown
  klass.send delete_all_method
end

#update_methodObject

Raises:

  • (NotImplementedError)


43
44
45
# File 'lib/friendly_id/test.rb', line 43

def update_method
  raise NotImplementedError
end

#validation_exceptionsObject



47
48
49
# File 'lib/friendly_id/test.rb', line 47

def validation_exceptions
  return RuntimeError
end