spec/lib/hamster/vector/exists_spec.rb in hamster-1.0.1.pre.rc2 vs spec/lib/hamster/vector/exists_spec.rb in hamster-1.0.1.pre.rc3
- old
+ new
@@ -9,18 +9,18 @@
context "when created with no values" do
let(:values) { [] }
context "with a block" do
- let(:block) { ->(item) { item + 1 } }
+ let(:block) { ->(item) { item + 1 }}
it "returns false" do
expect(exists?).to be(false)
end
end
- context "with a block" do
+ context "without a block" do
let(:block) { nil }
it "returns false" do
expect(exists?).to be(false)
end
@@ -29,18 +29,18 @@
context "when created with values" do
let(:values) { ["A", "B", 3, nil] }
context "with a block that returns true" do
- let(:block) { ->(item) { item == 3 } }
+ let(:block) { ->(item) { item == 3 }}
it "returns true" do
expect(exists?).to be(true)
end
end
context "with a block that doesn't return true" do
- let(:block) { ->(item) { item == "D" } }
+ let(:block) { ->(item) { item == "D" }}
it "returns false" do
expect(exists?).to be(false)
end
end