require "spec_helper"

describe Array do
	context "#all_empty?" do
		it "returns true if all elements of the array are empty" do
			expect(["","",""].all_empty?).to be_truthy
		end

		it "returns false if some of the Array elements are not empty" do
			expect(["",1,"", Object.new, :a].all_empty?).to be_falsey
		end
	end

	context "#all_same?" do
		it "returns true if all elements of the Array are the same" do
			expect(["A","A","A"].all_same?).to be_truthy
		end

		it "returns false if some of the Array elements are not the same" do
			expect(["",1,"", Object.new, :a].all_same?).to be_falsey
		end

		it "returns true for an empty array" do
			expect([].all_same?).to be_truthy
		end
	end

	context "#any_empty?" do
		it "returns true if some of the Array elements are empty" do
			expect(["",:a, 3].any_empty?).to be_truthy
		end

		it "returns false if none of the Array elements are empty" do
			expect(["a", :o, 0].any_empty?).to be_falsey
		end
	end
end