spec/dm/matchers/have_one_spec.rb in dm-rspec-0.1.2 vs spec/dm/matchers/have_one_spec.rb in dm-rspec-0.2.0
- old
+ new
@@ -14,6 +14,12 @@
context '#should_not' do
it 'fails if association exists' do
lambda { Book.should_not have_one :foreword}.should fail_with "expected not to have one foreword"
end
end
+
+ context 'instance of model' do
+ it 'should pass' do
+ lambda { Book.new.should have_one :foreword}.should_pass
+ end
+ end
end