Sha256: 63e65036b82b0461b4610baa605f02ab53774c43511413db5fe821c1c6057591
Contents?: true
Size: 949 Bytes
Versions: 6
Compression:
Stored size: 949 Bytes
Contents
require 'spec_helper' describe 'observer' do use_helpers :observer before :each do Rails3::Assist::Directory.rails_root = fixtures_dir remove_observer :account if has_observer? :account create_observer :account do %q{ def index end } end end after :each do # remove_observer :account end it "should have an account_observer file that contains an index method and two inserted comments" do insert_into_observer :account, :content => '# hello' insert_into_observer :account do '# goodbye' end read_observer(:account).should have_comment 'hello' puts read_observer(:account) # root_dir.should have_observer :account do |observer_file| # observer_file.should have_method :index # observer_file.should have_comment 'hello' # observer_file.should have_comment 'goodbye' # end end end
Version data entries
6 entries across 6 versions & 1 rubygems