Sha256: ffd59ad3798f9bc474d20008d89f5ef2b4e288d986d535b350892150315fc4e5
Contents?: true
Size: 477 Bytes
Versions: 1
Compression:
Stored size: 477 Bytes
Contents
RSpec::Matchers.define :invalidate do match do |actual| actual.save.should == false actual.errors[:base].should == ["Access denied"] end end RSpec::Matchers.define :validate do match do |actual| actual.class.transaction do actual.save.should == true raise ActiveRecord::Rollback end true end end def log! around(:each) do |e| ActiveRecord::Base.logger = Logger.new(STDOUT) e.run ActiveRecord::Base.logger = nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
protector-0.1.1 | spec/spec_helpers/adapters/active_record.rb |