Sha256: f95911cf68fca9b7ef6527943f4d07f28d29acfd91433022f8fdc7b8e7de3809

Contents?: true

Size: 723 Bytes

Versions: 112

Compression:

Stored size: 723 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'
require File.dirname(__FILE__) + '/stack'

class StackExamples < Spec::ExampleGroup
  describe(Stack)
  before(:each) do
    @stack = Stack.new
  end
end

class EmptyStackExamples < StackExamples
  describe("when empty")
  it "should be empty" do
    @stack.should be_empty
  end
end

class AlmostFullStackExamples < StackExamples
  describe("when almost full")
  before(:each) do
    (1..9).each {|n| @stack.push n}
  end
  it "should be full" do
    @stack.should_not be_full
  end
end

class FullStackExamples < StackExamples
  describe("when full")
  before(:each) do
    (1..10).each {|n| @stack.push n}
  end
  it "should be full" do
    @stack.should be_full
  end
end

Version data entries

112 entries across 112 versions & 12 rubygems

Version Path
dchelimsky-rspec-1.1.10 examples/pure/nested_classes_example.rb
dchelimsky-rspec-1.1.11.1 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11.2 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11.3 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11.4 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11.5 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11.6 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11.7 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.11 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.12 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.1 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.13 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.2 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.3 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.4 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.5 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.6 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.7 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.8 examples/passing/nested_classes_example.rb
dchelimsky-rspec-1.1.99.9 examples/passing/nested_classes_example.rb