Sha256: ea62489621da579745f4fc87c67158dcf2d0f457cbd82f56532731d0fc720a2d

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 Bytes

Contents

shared_examples_for 'all sinatra-mongo test apps' do
  describe 'GET /' do
    before(:each) do
      3.times { |i| mongo['test_collection'].insert({'x' => i }) }
    end

    after(:each) do
      mongo['test_collection'].remove
    end

    it 'fetches and shows the first element in test_collection' do
      get '/' do |response|
        response.body.should match('"x"=>0')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-mongo-0.1.0 spec/support/shared_examples.rb