Sha256: 9c9ae5b982bf26eb8fcbe9dcf3e07893aac3bccc4c4d5aa99e4beb605d4e5d4b
Contents?: true
Size: 887 Bytes
Versions: 12
Compression:
Stored size: 887 Bytes
Contents
require 'spec_helper' describe WrongScopeDuck do it "should raise an error because of an unknown scope" do expect { WrongScopeDuck.create(:name => 'Quocky', :pond => 'Shin') }.to raise_error(RankedModel::InvalidScope, 'No scope called "non_existant_scope" found in model') end end describe WrongFieldDuck do it "should raise an error because of an unknown field" do expect { WrongFieldDuck.create(:name => 'Quicky', :pond => 'Shin') }.to raise_error(RankedModel::InvalidField, 'No field called "non_existant_field" found in model') end end describe ReallyWrongFieldDuck do it "should raise an error because of a specific unknown field" do expect { ReallyWrongFieldDuck.create(:name => 'Quicky', :pond => 'Shin') }.to raise_error(RankedModel::InvalidField, 'No field called "non_existant_field" found in model') end end
Version data entries
12 entries across 12 versions & 2 rubygems