Sha256: 7636ec867b305b2e58b7cad577e812cbf058bd0fc06f9aca3499c3d832d0f844

Contents?: true

Size: 467 Bytes

Versions: 19

Compression:

Stored size: 467 Bytes

Contents

require "spec_helper"

describe Schematic::Serializers::Xsd do
  describe ".xsd_ignore_methods" do
    with_model :some_model do
      table :id => false do |t|
        t.string :title
      end

      model do
        def self.xsd_ignore_methods
          [:title]
        end
      end
    end

    it "should exclude the methods" do
      xsd = generate_xsd_for_model(SomeModel) do
      end

      sanitize_xml(SomeModel.to_xsd).should eq(xsd)
    end
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
schematic-0.3.8 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.7 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.6 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.5 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.4 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.3 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.2 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.1 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.3.0 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.2.3 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.2.1 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.9 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.8 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.7 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.6 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.5 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.4 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.3 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb
schematic-0.1.2 spec/schematic/serializers/xsd_xsd_ignore_methods_spec.rb