spec/site_spec.rb in taza-0.8.7 vs spec/site_spec.rb in taza-0.9.0

- old
+ new

@@ -1,6 +1,6 @@ -require 'spec/spec_helper' +require 'spec_helper' require 'rubygems' require 'taza/site' require 'taza/settings' require 'taza/options' require 'taza/browser' @@ -203,29 +203,29 @@ browser.stubs(:goto) browser.expects(:close) Foo.new() {} end - + module Zoro class Zoro < ::Taza::Site end end - + it "should pass in the class name to settings config" do browser = stub() browser.stubs(:goto) Taza::Browser.stubs(:create).returns(browser) Taza::Settings.expects(:config).with('Zoro').returns({}) Zoro::Zoro.new end - + it "should load settings based on the sites class name" do Taza::Settings.expects(:site_file).with('Zoro').returns({}) Zoro::Zoro.settings end - + def stub_browser browser = stub() browser.stubs(:close) browser.stubs(:goto) browser @@ -255,10 +255,10 @@ browser.expects(:close).never Taza::Browser.stubs(:create).returns(browser) Taza::Site.donot_close_browser Foo.new {} end - + it "should have a way to keep the browser instance open if an error is raised" do browser = stub_browser browser.expects(:close).never Taza::Browser.stubs(:create).returns(browser) Taza::Site.donot_close_browser