Sha256: 60c5e482616e4258184a86a06bb782ada81533f3b9149b913d184cbac4fc14cd
Contents?: true
Size: 486 Bytes
Versions: 1
Compression:
Stored size: 486 Bytes
Contents
require 'spec_helper' describe ::Trax::Model::Matchable do let(:product) { ::Product.create(:name => "27 inch iMac") } subject{ product } describe ".matching" do it('does a like lookup') do Product.matching(:name => "imac").to_sql.should include("LIKE '%imac%'") end ["imac", "ima", "INCH IMAC", "27"].each do |keyword| it "#{keyword} should return match" do Product.matching(:name => keyword).should include subject end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trax_model-0.0.1 | spec/trax/model/matchable_spec.rb |