Sha256: 5b4e388e379eb685902ddd5f08f85d804467124d41118648df315f8eea50241a
Contents?: true
Size: 918 Bytes
Versions: 1
Compression:
Stored size: 918 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' require 'rails_generator' require 'rails_generator/scripts/generate' describe 'CouchRestRails' do after :all do CouchRest.delete(COUCHDB_CONFIG[:full_path]) rescue nil end describe 'plugin installation' do before :all do @fake_rails_root = File.join(File.dirname(__FILE__), 'rails_root') FileUtils.mkdir_p(@fake_rails_root) FileUtils.mkdir_p("#{@fake_rails_root}/config/initializers") end after :all do FileUtils.rm_rf(@fake_rails_root) end it "should generate the necessary files in the host application" do Rails::Generator::Scripts::Generate.new.run( ['couchrest_rails', 'relax'], :destination => @fake_rails_root) Dir.glob(File.join(@fake_rails_root, "**", "*.*")).map {|f| File.basename(f)}.should == ['couchdb.yml', 'couchdb.rb'] 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_spec.rb |