Sha256: ed91e88a5ee50b44f5fa5a9074623553acd55a9e8d315adb8559fe4f2ae8ddcf

Contents?: true

Size: 389 Bytes

Versions: 4

Compression:

Stored size: 389 Bytes

Contents

FancySpec describe: Stack with: {
  it: "should be empty when created" for: '<< when: {
    s = Stack new
    s empty? should == true
  }

  it: "should return the last inserted element" for: 'pop when: {
    s = Stack new
    s push: 1
    s pop should == 1

    objs = [1,2,3]
    objs each: |x| {
      s push: x
    }

    objs reverse each: |x| {
      s pop should == x
    }

  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fancy-0.3.3 tests/stack.fy
fancy-0.3.2 tests/stack.fy
fancy-0.3.1 tests/stack.fy
fancy-0.3.0 tests/stack.fy