Sha256: 27433dc9833f30ccb204893716a473ad48d6640a6c2d8fdf40e15b810583f313
Contents?: true
Size: 695 Bytes
Versions: 5
Compression:
Stored size: 695 Bytes
Contents
require 'spec_helper' describe DataMapper::Matchers::HaveProperty do context '#should' do it 'passes if property exists' do lambda {Book.should have_property :name}.should_pass end it 'fails if property does not exist' do lambda {Book.should have_property :bad_property}.should fail_with "expected to have property bad_property" end end context '#should_not' do it 'fails if property exists' do lambda {Book.should_not have_property :name}.should fail_with "expected to not have property name" end end context 'instance of model' do it "should pass" do lambda{ Book.new.should have_property :name}.should_pass end end end
Version data entries
5 entries across 5 versions & 1 rubygems