Sha256: 1a47976a5283ef7a1a8e13f44880aa77706c46e59c6c589ce5ae96a66d8f048c

Contents?: true

Size: 586 Bytes

Versions: 10

Compression:

Stored size: 586 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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ranked-model-0.4.0 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.3 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.2.1 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.2.0 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.1.1 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.1.0 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.0.5 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.0.4 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.0.3 spec/duck-model/wrong_ducks_spec.rb
ranked-model-0.0.2 spec/duck-model/wrong_ducks_spec.rb