spec/lib/string_spec.rb in active_object-1.0.8 vs spec/lib/string_spec.rb in active_object-1.1.0
- old
+ new
@@ -1,8 +1,20 @@
require 'spec_helper'
describe String do
+ describe "#any?" do
+ it "to be true" do
+ expect("example string".any?("example")).to eq(true)
+ expect("example string".any?("foo", "string")).to eq(true)
+ end
+
+ it "to be false" do
+ expect("example string".any?("foo")).to eq(false)
+ expect("example string".any?("foo", "bar")).to eq(false)
+ end
+ end
+
describe "#at" do
it "to be e" do
expect("example".at(0)).to eq("e")
expect("example".at(-1)).to eq("e")
end
\ No newline at end of file