Sha256: af37eb53b217e2cca750df8a06d5f22559657d010271ab8a779ef19194e0faf5
Contents?: true
Size: 1.04 KB
Versions: 27
Compression:
Stored size: 1.04 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' require 'database_cleaner/couch_potato/truncation' require 'couch_potato' module DatabaseCleaner module CouchPotato describe Truncation do let(:database) { double('database') } before(:each) do ::CouchPotato.stub(:couchrest_database).and_return(database) end it "should re-create the database" do database.should_receive(:recreate!) Truncation.new.clean end it "should raise an error when the :only option is used" do running { Truncation.new(:only => ['document-type']) }.should raise_error(ArgumentError) end it "should raise an error when the :except option is used" do running { Truncation.new(:except => ['document-type']) }.should raise_error(ArgumentError) end it "should raise an error when invalid options are provided" do running { Truncation.new(:foo => 'bar') }.should raise_error(ArgumentError) end end end end
Version data entries
27 entries across 22 versions & 4 rubygems