Log specs don't check for specific number of renders.

This commit is contained in:
Sarah Mei 2011-01-12 22:43:45 -08:00
parent ce4fe1938c
commit 9c87fff295
3 changed files with 2 additions and 6 deletions

View file

@ -29,7 +29,6 @@ describe AspectsController do
describe "custom logging on success" do
before do
@action = :index
@expected_renders = 15
end
it_should_behave_like "it overrides the logs on success"
end

View file

@ -31,7 +31,6 @@ describe HomeController do
before do
@action = :show
@action_params = {"lasers" => "green"}
@expected_renders = 1
end
it_should_behave_like "it overrides the logs on success"
end

View file

@ -15,12 +15,10 @@ shared_examples_for 'it overrides the logs on success' do
Rails.stub(:logger).and_return(FakeLogger.new)
end
context 'rendering' do
before do
it 'logs renders' do
get @action, @action_params
@lines = Rails.logger.infos.select { |l| l.include?("event=render") }
end
it 'logs all renders' do
@lines.length.should == @expected_renders
@lines.length.should > 0
end
end
context 'completion' do