Sha256: 9b7fb2610df2ec746d1d89cf59c085961751d89561ccca2381bc5b08abe1d384
Contents?: true
Size: 709 Bytes
Versions: 3
Compression:
Stored size: 709 Bytes
Contents
require 'spec_helper' require "set" shared_examples_for "a collection" do let(:collection) { described_class.new([7, 2, 4]) } context "initialized with 3 items" do it "says it has three items" do collection.size.should eq(3) end end describe "#include?" do context "with an an item that is in the collection" do it "returns true" do collection.include?(7).should be_true end end context "with an an item that is not in the collection" do it "returns false" do collection.include?(9).should be_false end end end end describe Array do it_behaves_like "a collection" end describe Set do it_behaves_like "a collection" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
allure-rspec-0.6.8 | spec/shared_example_spec.rb |
allure-rspec-0.6.7 | spec/shared_example_spec.rb |
allure-rspec-0.6.6 | spec/shared_example_spec.rb |