Flowdock
method

determine_constant_from_test_name

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: ClassMethods
determine_constant_from_test_name(test_name) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/testing/constant_lookup.rb, line 34
        def determine_constant_from_test_name(test_name)
          names = test_name.split "::"
          while names.size > 0 do
            names.last.sub!(/Test$/, "")
            begin
              constant = names.join("::").safe_constantize
              break(constant) if yield(constant)
            ensure
              names.pop
            end
          end
        end
Register or log in to add new notes.