Sha256: b53a8199633f53a59c8232d7aa51fe8fd05ba744b686fdaec4a86f62d1a084d0

Contents?: true

Size: 1.28 KB

Versions: 23

Compression:

Stored size: 1.28 KB

Contents

require 'spec_helper'

describe CouchPotato, 'full_url_to_database' do
  before(:each) do
    @original_database_name = CouchPotato::Config.database_name
  end
  after(:each) do
    CouchPotato::Config.database_name = @original_database_name
  end
  
  it "should add the default localhost and port if only a name is set" do
    CouchPotato::Config.database_name = 'test'
    CouchPotato.full_url_to_database.should == 'http://127.0.0.1:5984/test'
  end
  
  it "should return the set url" do
    CouchPotato::Config.database_name = 'http://db.local/test'
    CouchPotato.full_url_to_database.should == 'http://db.local/test'
  end
end

describe CouchPotato, 'validation_framework' do
  before(:each) do
    @original_validation_framework = CouchPotato::Config.validation_framework
  end
  after(:each) do
    CouchPotato::Config.validation_framework = @original_validation_framework
  end

  it "should allow setting the validation_framework to :active_model" do
    CouchPotato::Config.validation_framework = :active_model
    CouchPotato::Config.validation_framework.should == :active_model
  end

  it "should allow setting the validation_framework to :validatable" do
    CouchPotato::Config.validation_framework = :validatable
    CouchPotato::Config.validation_framework.should == :validatable
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
couch_potato-rails2-0.5.10 spec/unit/couch_potato_spec.rb
couch_potato-rails2-0.5.9 spec/unit/couch_potato_spec.rb
couch_potato-rails2-0.5.8 spec/unit/couch_potato_spec.rb
couch_potato-rails2-0.5.7 spec/unit/couch_potato_spec.rb
couch_potato-rails2-0.5.6 spec/unit/couch_potato_spec.rb
couch_potato-0.5.6 spec/unit/couch_potato_spec.rb
couch_potato-0.5.5 spec/unit/couch_potato_spec.rb
couch_potato-0.5.4 spec/unit/couch_potato_spec.rb
couch_potato-0.5.3 spec/unit/couch_potato_spec.rb
couch_potato-0.5.2 spec/unit/couch_potato_spec.rb
couch_potato-0.5.1 spec/unit/couch_potato_spec.rb
couch_potato-0.5.0 spec/unit/couch_potato_spec.rb
davber_couch_potato-0.4.0 spec/unit/couch_potato_spec.rb
couch_potato-0.4.0 spec/unit/couch_potato_spec.rb
couch_potato-0.3.2 spec/unit/couch_potato_spec.rb
couch_potato-0.3.1 spec/unit/couch_potato_spec.rb
davber_couch_potato-0.3.0 spec/unit/couch_potato_spec.rb
couch_potato-0.3.0 spec/unit/couch_potato_spec.rb
couch_potato-0.2.32 spec/unit/couch_potato_spec.rb
couch_potato-0.2.31 spec/unit/couch_potato_spec.rb