spec/strings_spec.rb in knjrbfw-0.0.41 vs spec/strings_spec.rb in knjrbfw-0.0.42
- old
+ new
@@ -15,7 +15,13 @@
regex = Knj::Strings.regex("/\d+/U")
raise "Ruby doesnt support the U-modifier - an exception should be thrown!"
rescue Knj::Errors::InvalidData
#this should happen - Ruby doesnt support U-modifier...
end
+
+ res = Knj::Strings.is_regex?("Kasper")
+ raise "Expected res to be false but it wasnt." if res
+
+ res = Knj::Strings.is_regex?("/^Kasper$/")
+ raise "Expected res to be true but it wasnt." if !res
end
end
\ No newline at end of file