Sha256: c31c8f045ce4e35331016c8387dd67b8ee56c3f8fdb6cfc772f9a0a267eb1ee3

Contents?: true

Size: 710 Bytes

Versions: 4

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'

describe Storey, "#drop" do
  context "when suffix is set" do
    before do
      Storey.configuration.suffix = "bar"
      Storey.create "foo"
    end

    it "should drop the schema with the suffix" do
      Storey.drop "foo"
      Storey.schemas.should_not include("foo")
    end
  end

  context "when suffix is not set" do
    it "should drop the schema without the suffix" do
      Storey.create "foobar"
      Storey.drop "foobar"
      Storey.schemas.should_not include("foobar")
    end
  end

  context "when the schema does not exist" do
    it "should raise an error" do
      expect { Storey.drop "foobar" }.
        to raise_error(Storey::SchemaNotFound)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
storey-2.2.0 spec/storey/drop_spec.rb
storey-2.1.2 spec/storey/drop_spec.rb
storey-2.1.1 spec/storey/drop_spec.rb
storey-2.1.0 spec/storey/drop_spec.rb