lib/cql/dsl.rb in cql-1.0.0 vs lib/cql/dsl.rb in cql-1.0.1
- old
+ new
@@ -144,9 +144,12 @@
# Check for exact class match first because it should take precedence
return CukeModeler.const_get(where) if CukeModeler.const_defined?(where)
# Check for pluralization of class match (i.e. remove the final 's')
return CukeModeler.const_get(where.chop) if CukeModeler.const_defined?(where.chop)
+
+ # Then the class must not be a CukeModeler class
+ raise(ArgumentError, "Class 'CukeModeler::#{where}' does not exist")
end
end
end