Sha256: b098c86dfa1e9edb55cd8d2229baf56b19125dc80018c739f7c6a14c1fa4114c

Contents?: true

Size: 659 Bytes

Versions: 1

Compression:

Stored size: 659 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe CouchRestRails::Views do
  
  before :each do
    CouchRestRails.views_path = 'vendor/plugins/couchrest-rails/spec/mock/views'
    CouchRestRails.fixtures_path = 'vendor/plugins/couchrest-rails/spec/mock/fixtures'
    
  end
  
  after :all do
    CouchRestRails::Tests.teardown
  end
  
  describe '#push' do
  
    it "should push the views in CouchRestRails.views_path to a design document for the database" do
      CouchRestRails::Tests.setup # Pushes views
      db = CouchRest.database(COUCHDB_CONFIG[:full_path])
      db.view('foos/all')['rows'].size.should == 5
    end
  
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
therealadam-couchrest-rails-0.1.1 spec/lib/couch_rest_rails/views_spec.rb