2 require File.dirname(__FILE__) + '/../../../../spec_helper.rb'
4 module TestSuiteAdapterSpecHelper
5 def create_adapter(group)
6 Test::Unit::TestSuiteAdapter.new(group)
10 describe "TestSuiteAdapter#size" do
11 include TestSuiteAdapterSpecHelper
12 it "should return the number of examples in the example group" do
13 group = Class.new(Spec::ExampleGroup) do
14 describe("some examples")
18 adapter = create_adapter(group)
19 adapter.size.should == 2
23 describe "TestSuiteAdapter#delete" do
24 include TestSuiteAdapterSpecHelper
25 it "should do nothing" do
26 group = Class.new(Spec::ExampleGroup) do
27 describe("Some Examples")
28 it("does something") {}
30 adapter = create_adapter(group)
31 adapter.delete(adapter.examples.first)
32 adapter.should be_empty