Sha256: 44b8608ff0114cc35255f1a8170b18c3a77601ddd9a9b2e1c908d30174c560ce

Contents?: true

Size: 777 Bytes

Versions: 17

Compression:

Stored size: 777 Bytes

Contents

require 'spec_helper'

describe Storey, "#schema" do
  it "should return the current schema" do
    Storey.schema.should == %{"$user",public}
  end

  context "when a suffix is set" do
    before do
      Storey.suffix = "_rock"
      Storey.create "hello"
      Storey.switch "hello"
    end

    it "should return the schema without the suffix by default" do
      Storey.schema.should == "hello"
    end

    context "when :suffix => true" do
      it "should return the schema with the suffix" do
        Storey.schema(:suffix => true).should include("hello_rock")
      end
    end

    context "when :suffix => false" do
      it "should return the schema without the suffix" do
        Storey.schema(:suffix => false).should include("hello")
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
storey-1.0.0 spec/storey/schema_spec.rb
storey-0.6.0 spec/storey/schema_spec.rb
storey-0.5.2 spec/storey/schema_spec.rb
storey-0.5.1 spec/storey/schema_spec.rb
storey-0.5.0 spec/storey/schema_spec.rb
storey-0.4.2 spec/storey/schema_spec.rb
storey-0.4.1 spec/storey/schema_spec.rb
storey-0.4.0 spec/storey/schema_spec.rb
storey-0.3.6 spec/storey/schema_spec.rb
storey-0.3.5 spec/storey/schema_spec.rb
storey-0.3.4 spec/storey/schema_spec.rb
storey-0.3.3 spec/storey/schema_spec.rb
storey-0.3.1 spec/storey/schema_spec.rb
storey-0.3.0 spec/storey/schema_spec.rb
storey-0.2.0 spec/storey/schema_spec.rb
storey-0.1.0 spec/storey/schema_spec.rb
storey-0.0.1 spec/storey/schema_spec.rb