Sha256: a4282ab0d5417a000c2ba14446c62b3cc2e828b2678391388026aa62aef182fd
Contents?: true
Size: 609 Bytes
Versions: 12
Compression:
Stored size: 609 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../snippets_spec_helper.rb') describe UserActionObserver do dataset :users, :pages_with_layouts, :snippets before(:each) do @user = users(:existing) UserActionObserver.current_user = @user end it 'should observe create' do snippet = Snippet.create!(snippet_params) snippet.created_by.should == @user end it 'should observe update' do [ snippets(:first) ].each do |model| model.attributes = model.attributes.dup model.save.should == true model.updated_by.should == @user end end end
Version data entries
12 entries across 12 versions & 2 rubygems