Sha256: 4be85efd108dc68c57ef7ad207afdb1dc7a79ac4491f88e20c8f1ef72fbabe02
Contents?: true
Size: 799 Bytes
Versions: 4
Compression:
Stored size: 799 Bytes
Contents
# encoding: UTF-8 require File.join(File.expand_path(File.dirname(__FILE__)), '../test_helper') class InflectionalTest < ActiveSupport::TestCase setup do @words = %w(Lorem ipsum dolor sit amet consectetur adipisicing elit sed do) end test "instance creation" do label = Label::SKOSXL::Base.create!(:value => "foo", :origin => Origin.new("foo").to_s) label.inflectionals.create!(:value => "bar") assert_equal 2, Inflectional::Base.count assert_equal ["foo", "bar"], Inflectional::Base.all.map(&:value) end test "hashing of values within the label callback" do @words.each do |word| Label::SKOSXL::Base.create!(:value => word, :origin => Origin.new(word).to_s) end assert_equal @words.count, Inflectional::Base.count end end
Version data entries
4 entries across 4 versions & 1 rubygems