Exception: Smartest::AroundTestFixtureScopeError

Inherits:
Error
  • Object
show all
Defined in:
lib/smartest/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(fixture_class, fixture_names) ⇒ AroundTestFixtureScopeError

Returns a new instance of AroundTestFixtureScopeError.



54
55
56
57
58
59
60
61
62
# File 'lib/smartest/errors.rb', line 54

def initialize(fixture_class, fixture_names)
  class_name = fixture_class.name || fixture_class.inspect
  names = fixture_names.map { |fixture_name| ":#{fixture_name}" }.join(", ")

  super(
    "#{class_name} cannot be registered from around_test because it defines suite-scoped fixtures: #{names}. " \
    "Register fixture classes with suite_fixture from around_suite instead."
  )
end