Sha256: e12190de1ac6125cc51c3d379b888eca2bb95c88a9a0b9abeb053ecc80aabb95
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Daywalker::DynamicFinderMatch do describe 'finding all by valid attributes (state and district number)' do subject { Daywalker::DynamicFinderMatch.new(:find_all_by_state_and_district_number) } specify 'should have :all finder' do subject.finder.should == :all end specify 'should have attributes named [:state, :district_number]' do subject.attribute_names.should == [:state, :district_number] end specify { should be_a_match } end describe 'finding all by invalid attributes (foo and bar)' do subject { Daywalker::DynamicFinderMatch.new(:find_all_by_foo_and_bar) } specify { should_not be_a_match } end describe 'finding one by valid attrribute (govtrack_id)' do subject { Daywalker::DynamicFinderMatch.new(:find_by_govtrack_id) } specify { should be_a_match } specify 'should have :govtrack_id attribute' do subject.attribute_names.should == [:govtrack_id] end specify 'should have :one finder' do subject.finder.should == :one end end end
Version data entries
3 entries across 3 versions & 1 rubygems