Sha256: 6151f81980d95fab5a682007fbd26e350b6acbaa7cd4be49e269a945bc9416bc
Contents?: true
Size: 771 Bytes
Versions: 1
Compression:
Stored size: 771 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe 'have_key' do subject do Article.new end describe 'messages' do it 'should contain a description' do matcher = have_key(:title, String) matcher.description.should == 'have key(s) title' end it 'should set has_key? message' do matcher = have_key(:owner, String) matcher.matches?(subject) matcher.failure_message.should == 'Expected Article to have key named owner with type String' end end describe 'matchers' do it { should have_key(:title, String) } it { should have_keys(:title, :body, String) } end describe 'macros' do should_have_key :title, String should_have_keys :title, :body, String end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yeastymobs-remarkable_mongomapper-0.1.0 | spec/matchers/have_key_matcher_spec.rb |