File: hashie_forbidden_attributes_test.rb

package info (click to toggle)
ruby-hashie-forbidden-attributes 0.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: ruby: 150; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'test_helper'

class HashieForbiddenAttributesTest < ActiveSupport::TestCase
  def setup
    @mash = Hashie::Mash.new
  end

  test 'mash does not respond to permitted?' do
    assert_equal false, @mash.respond_to?(:permitted?)
  end

  test 'mash does not handle permitted? method' do
    assert_raises(ArgumentError) { @mash.permitted? }
  end
end