Log specs don't check for specific number of renders.
This commit is contained in:
parent
ce4fe1938c
commit
9c87fff295
3 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue