spec/awestruct/handlers/file_handler_spec.rb in awestruct-0.5.7.RC2 vs spec/awestruct/handlers/file_handler_spec.rb in awestruct-0.5.7

- old
+ new

@@ -7,16 +7,13 @@ def transform(site, page, rendered) rendered.gsub( /howdy/, 'adios' ) end end - before :all do + before :each do @site = Hashery::OpenCascade[ { :encoding=>false, :dir=>Pathname.new( test_data_dir '' )}] @site.engine = Hashery::OpenCascade[] - end - - before :each do @filename = Pathname.new( test_data_dir 'simple-file.txt' ) @handler = Awestruct::Handlers::FileHandler.new( @site, @filename ) @page = Awestruct::Page.new( @site, @handler ) @site.engine.pipeline = Awestruct::Pipeline.new end @@ -48,13 +45,13 @@ FileUtils.touch( @filename ) @handler.should be_stale end it "should provide reasonable paths" do - @handler.relative_source_path.should == '/simple-file.txt' + @handler.relative_source_path.to_s.should == '/simple-file.txt' @handler.output_filename.should == 'simple-file.txt' @handler.output_extension.should == '.txt' - @handler.output_path.should == '/simple-file.txt' + @handler.output_path.to_s.should == '/simple-file.txt' end it "should be able to create an appropriate context" do context = @page.create_context context.site.should == @site