Sha256: 9e24a812ae1d69b041d8edbe056dcaf47bd735bbf387d4207f9f2a57568d91c8

Contents?: true

Size: 744 Bytes

Versions: 11

Compression:

Stored size: 744 Bytes

Contents

# -*- coding: utf-8 -*-
require 'spec_helper'

require 'stringio'

describe Tengine::Core::SelectableAttr do

  module TestModule1
    class TestClass1
      include Tengine::Core::SelectableAttr
      selectable_attr :foo do
        entry 1, :a, "do"
        entry 2, :b, "re"
        entry 3, :c, "mi"
      end
      multi_selectable_attr :bar do
        entry 1, :x, "red"
        entry 2, :y, "green"
        entry 3, :z, "blue"
      end
    end
  end

  it "i18n_scopeが設定されている" do
    TestModule1::TestClass1.foo_enum.i18n_scope.should == ['selectable_attrs', 'test_module1/test_class1', 'foo']
    TestModule1::TestClass1.bar_enum.i18n_scope.should == ['selectable_attrs', 'test_module1/test_class1', 'bar']
  end


end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tengine_core-0.5.39 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.38 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.37 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.36 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.35 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.34 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.33 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.32 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.31 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.30 spec/tengine/core/selectable_attr_spec.rb
tengine_core-0.5.28 spec/tengine/core/selectable_attr_spec.rb