Created
February 16, 2009 15:10
-
-
Save zapnap/65200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
specify 'should retrieve artists for typeahead filtering' do | |
Artist.should_receive(:all).with(:limit => SiteConfig.max_artists, :name.like => '%ab%').and_return(@artists) | |
get '/artists.json', :q => 'ab' | |
end | |
Spec::Mocks::MockExpectationError in 'main application /artists.json should retrieve artists for typeahead filtering' | |
<Artist (class)> expected :all with ({#<DataMapper::Query::Operator:0x2526b2c @operator=:like, @target=:name>=>"%ab%", :limit=>500}) but received it with ({#<DataMapper::Query::Operator:0x2525380 @operator=:like, @target=:name>=>"%ab%", :limit=>500}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment