active_model_serializers/test/serializers/options_test.rb
Benjamin Fleischer 419faf03b9 Favor ActiveSupport::TestCase over Minitest::Test
- Better minitest 4/5 support
- Better DSL
- Already available with no changes
- Consistent interface
2015-12-22 10:35:51 -06:00

22 lines
589 B
Ruby

require 'test_helper'
module ActiveModel
class Serializer
class OptionsTest < ActiveSupport::TestCase
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