Sha256: fb4e74e50ce32b417531578e92b3fe1f9e42fbfccaf791bcac2650df4603531e

Contents?: true

Size: 580 Bytes

Versions: 15

Compression:

Stored size: 580 Bytes

Contents

require 'test_helper'

module ActiveModel
  class Serializer
    class OptionsTest < Minitest::Test
      def setup
        @profile = Profile.new(name: 'Name 1', description: 'Description 1')
      end

      def test_options_are_accessible
        @profile_serializer = ProfileSerializer.new(@profile, my_options: :accessible)
        assert @profile_serializer.arguments_passed_in?
      end

      def test_no_option_is_passed_in
        @profile_serializer = ProfileSerializer.new(@profile)
        refute @profile_serializer.arguments_passed_in?
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
cm-active_model_serializers-0.10.0.rc1.1 test/serializers/options_test.rb
active_model_serializers-0.10.0.rc3 test/serializers/options_test.rb
cheap_ams-0.10.11 test/serializers/options_test.rb
cheap_ams-0.10.10 test/serializers/options_test.rb
cheap_ams-0.10.8 test/serializers/options_test.rb
cheap_ams-0.10.7 test/serializers/options_test.rb
cheap_ams-0.10.6 test/serializers/options_test.rb
cheap_ams-0.10.5 test/serializers/options_test.rb
cheap_ams-0.10.4 test/serializers/options_test.rb
cheap_ams-0.10.3 test/serializers/options_test.rb
cheap_ams-0.10.2 test/serializers/options_test.rb
cheap_ams-0.10.1 test/serializers/options_test.rb
cheap_ams-0.10.0.rc2 test/serializers/options_test.rb
active_model_serializers-0.10.0.rc2 test/serializers/options_test.rb
active_model_serializers-0.10.0.rc1 test/serializers/options_test.rb