Author: assaf
Date: Wed Sep 24 12:45:42 2008
New Revision: 698703
URL: http://svn.apache.org/viewvc?rev=698703&view=rev
Log:
Buildr.application.should_receive(method).ordered instead of checking order
ourselves.
Modified:
incubator/buildr/trunk/spec/core/application_spec.rb
Modified: incubator/buildr/trunk/spec/core/application_spec.rb
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/core/application_spec.rb?rev=698703&r1=698702&r2=698703&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/core/application_spec.rb (original)
+++ incubator/buildr/trunk/spec/core/application_spec.rb Wed Sep 24 12:45:42
2008
@@ -34,12 +34,8 @@
last = nil
order = [:load_requires, :find_buildfile, :load_gems, :load_artifacts,
:load_tasks, :load_buildfile, :load_imports, :top_level]
- order.each_with_index do |method, idx|
- Buildr.application.should_receive(method) do
- last.should == (idx == 0 ? nil : order[idx-1])
- last = method
- end
- end
+ order.each { |method| Buildr.application.should_receive(method).ordered }
+ Buildr.application.stub!(:exit) # With this, shows the correct error
instead of SystemExit.
Buildr.application.run
end
end