test/test_command.rb in jekyll-2.0.0.alpha.2 vs test/test_command.rb in jekyll-2.0.0.alpha.3

- old
+ new

@@ -34,6 +34,23 @@ teardown do FileUtils.rm_r(@dest) end end end + context "when calling .add_build_options" do + should "add common options" do + cmd = Object.new + mock(cmd).option.with_any_args.at_least(1) + Command.add_build_options(cmd) + end + end + context "when calling .process_site" do + context "when fatal error occurs" do + should "exit with non-zero error code" do + site = Object.new + stub(site).process { raise Jekyll::FatalException } + error = assert_raise(SystemExit) { Command.process_site(site) } + assert_not_equal 0, error.status + end + end + end end