test/pelusa/runner_test.rb in pelusa-0.1.1 vs test/pelusa/runner_test.rb in pelusa-0.2.0
- old
+ new
@@ -7,21 +7,15 @@
@report = stub(empty?: false, report: true)
analyzer = stub(:analyze => @report)
Analyzer.stubs(:new).returns analyzer
end
- describe 'when the reports are successful' do
- it 'returns 0' do
- @report.stubs(successful?: true)
- Pelusa.run(__FILE__).must_equal 0
- end
+ it 'runs a single file' do
+ Pelusa.run(__FILE__).must_equal [@report]
end
- describe 'when the reports have failed' do
- it 'returns 1' do
- @report.stubs(successful?: false)
- Pelusa.run(__FILE__).must_equal 1
- end
+ it 'runs multiple files' do
+ Pelusa.run([__FILE__, __FILE__]).must_equal [@report, @report]
end
end
end
end