Sha256: 11d963cf3a59dfeefed9e10365e54279c0aaedda01aa4012b83bd15ff72ef816

Contents?: true

Size: 452 Bytes

Versions: 1

Compression:

Stored size: 452 Bytes

Contents

# encoding: UTF-8
require 'test_helper'

class HermesStackTest < ActiveSupport::IntegrationCase
  setup do
    @messages = []
    Hermes.notifiers << lambda { |msg| @messages << msg }
  end

  teardown do
    Hermes.notifiers.pop
  end

  test "notifies when assigning a protected attribute" do
    User.create!(:id => 1, :name => "José Valim", :age => 23)
    assert_equal "Can't mass-assign User protected attributes: id.", @messages.last
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hermes-0.1.0 test/hermes_test.rb