Sha256: 36da3c37285a60d20ab6c86255a5338cfa6f10bdd5d5475b6618c79350c68e73

Contents?: true

Size: 1.76 KB

Versions: 2

Compression:

Stored size: 1.76 KB

Contents

require 'spec_helper'

module DmPanlex
   describe Lv, "Language variety" do
      it "has a property id (lv)" do
         should have_property :lv
      end
      it "has a property ISO 639 code (lc)" do
         should have_property :lc
      end
      it "has a property language-specific id (vc)" do
         should have_property :vc
      end
      it "has a property to show whether the variety permits synonymy (sy)" do
         should have_property :sy
      end
      it "has a property to show whether the variety permits ambiguity (am)" do
         should have_property :am
      end
      it "has a property label (tt)" do
         should have_property :tt
      end
      it "is not valid without an id" do
         should validate_presence_of :lv
      end
      it "is not valid without an ISO 639 code" do
         should validate_presence_of :lc
      end
      it "is not valid without a language-specific id" do
         should validate_presence_of :vc
      end
      it "is not valid without showing whether the variety permits synonymy" do
         should validate_presence_of :sy
      end
      it "is not valid without showing whether the variety permits ambiguity" do
         should validate_presence_of :am
      end
      it "is not valid without a label" do
         should validate_presence_of :tt
      end
      it "has many language approver varieties (av)" do
         should have_many :avs
      end
      it "has many language approved characters (cp)" do
         should have_many :cps
      end
      it "has many language exemplar characters (cu)" do
         should have_many :cus
      end
      it "has many definitions (df)" do
         should have_many :dfs
      end
      it "has many expressions (ex)" do
         should have_many :exs
      end
   end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dm_panlex-0.2.2 spec/dm_panlex/models/lv_spec.rb
dm_panlex-0.2.1 spec/dm_panlex/models/lv_spec.rb