Skip to content

Commit

Permalink
fixed the path and removed before(:all), added TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
orieken committed Mar 24, 2014
1 parent a9e832e commit 87d42f9
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions spec/taza/site_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
require 'taza/browser'
require 'taza/page'
require 'taza/flow'
root_path=File.join(File.dirname(__FILE__), '../../')
$LOAD_PATH.unshift root_path unless $LOAD_PATH.include?(root_path)
describe Taza::Site do

before :all do
@pages_path = File.join("spec","sandbox","pages","foo","**","*.rb")
@flows_path = File.join("spec","sandbox","flows","*.rb")
Foo = Class.new(Taza::Site)
end
describe Taza::Site do

before :each do
@pages_path = File.join(@original_directory, "spec","sandbox","pages","foo","**","*.rb")
@flows_path = File.join(@original_directory, "spec","sandbox","flows","*.rb")
Foo = Class.new(Taza::Site)
Foo.any_instance.stubs(:pages_path).returns(@pages_path)
ENV['BROWSER'] = nil
ENV['DRIVER'] = nil
Expand All @@ -36,8 +32,8 @@
browser = stub_browser
Taza::Browser.stubs(:create).returns(browser)
Barz = Class.new(Taza::Site)
Barz.any_instance.stubs(:path).returns('spec/sandbox')
Barz.any_instance.stubs(:flows_path).returns(@flows_path)
Barz.any_instance.stubs(:path).returns("#{@original_directory}/spec/sandbox/")
Barz.any_instance.stubs(:flows_path).returns("#{@original_directory}/spec/sandbox/flows/batman.rb")
Barz.new.batman_flow.should == "i am batman"
end

Expand Down

0 comments on commit 87d42f9

Please sign in to comment.