1
2
3
4
5
6
7
8
9
10
11
12
13
describe Stack do
  subject(:stack) { Stack.new }
  describe "#push" do
    before do
      stack.push(1)
      stack.push(2)
    end

    it "puts an element at the top of the stack" do 
      expect(stack.top).to eq(2)
    end
  end
end