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.



63
64
65
66
67
68
69
70
71
# File 'lib/smartest/errors.rb', line 63

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