Sha256: da652adf744ea207cf84edba59ca3f61d208ae24cb46b157bbe28914a989d1d2

Contents?: true

Size: 342 Bytes

Versions: 2

Compression:

Stored size: 342 Bytes

Contents

require 'test_helper'

module ActiveModel
  class Serializer
    class OptionsTest < Minitest::Test
      def setup
        @serializer = ProfileSerializer.new(nil, context: {foo: :bar})
      end

      def test_custom_options_are_accessible_from_serializer
        assert_equal({foo: :bar}, @serializer.context)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_model_serializers-0.9.2 test/unit/active_model/serializer/options_test.rb
active_model_serializers-0.9.0 test/unit/active_model/serializer/options_test.rb