From 9ceb4540a567b0a9de85af5397df4a292303a9c3 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Mon, 28 Jun 2010 16:32:11 -0700 Subject: [#3994-part 2] rename integration tests to *_spec.rb Some spec files like active_record.rb had names that would confuse the load path and get loaded instead of the intended implentation when the spec was run from the same directory as the file. Author: Matt Robinson Date: Fri Jun 11 15:29:33 2010 -0700 --- spec/integration/file_serving/content.rb | 20 -------------------- spec/integration/file_serving/content_spec.rb | 20 ++++++++++++++++++++ spec/integration/file_serving/fileset.rb | 14 -------------- spec/integration/file_serving/fileset_spec.rb | 14 ++++++++++++++ spec/integration/file_serving/metadata.rb | 21 --------------------- spec/integration/file_serving/metadata_spec.rb | 21 +++++++++++++++++++++ spec/integration/file_serving/terminus_helper.rb | 22 ---------------------- .../file_serving/terminus_helper_spec.rb | 22 ++++++++++++++++++++++ 8 files changed, 77 insertions(+), 77 deletions(-) delete mode 100755 spec/integration/file_serving/content.rb create mode 100755 spec/integration/file_serving/content_spec.rb delete mode 100755 spec/integration/file_serving/fileset.rb create mode 100755 spec/integration/file_serving/fileset_spec.rb delete mode 100755 spec/integration/file_serving/metadata.rb create mode 100755 spec/integration/file_serving/metadata_spec.rb delete mode 100755 spec/integration/file_serving/terminus_helper.rb create mode 100755 spec/integration/file_serving/terminus_helper_spec.rb (limited to 'spec/integration/file_serving') diff --git a/spec/integration/file_serving/content.rb b/spec/integration/file_serving/content.rb deleted file mode 100755 index a51b36223..000000000 --- a/spec/integration/file_serving/content.rb +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby -# -# Created by Luke Kanies on 2007-10-18. -# Copyright (c) 2007. All rights reserved. - -require File.dirname(__FILE__) + '/../../spec_helper' - -require 'puppet/file_serving/content' -require 'shared_behaviours/file_serving' - -describe Puppet::FileServing::Content, " when finding files" do - it_should_behave_like "Puppet::FileServing::Files" - - before do - @test_class = Puppet::FileServing::Content - @indirection = Puppet::FileServing::Content.indirection - end - - after { Puppet::Util::Cacher.expire } -end diff --git a/spec/integration/file_serving/content_spec.rb b/spec/integration/file_serving/content_spec.rb new file mode 100755 index 000000000..a51b36223 --- /dev/null +++ b/spec/integration/file_serving/content_spec.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby +# +# Created by Luke Kanies on 2007-10-18. +# Copyright (c) 2007. All rights reserved. + +require File.dirname(__FILE__) + '/../../spec_helper' + +require 'puppet/file_serving/content' +require 'shared_behaviours/file_serving' + +describe Puppet::FileServing::Content, " when finding files" do + it_should_behave_like "Puppet::FileServing::Files" + + before do + @test_class = Puppet::FileServing::Content + @indirection = Puppet::FileServing::Content.indirection + end + + after { Puppet::Util::Cacher.expire } +end diff --git a/spec/integration/file_serving/fileset.rb b/spec/integration/file_serving/fileset.rb deleted file mode 100755 index 80bf0f376..000000000 --- a/spec/integration/file_serving/fileset.rb +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby - -require File.dirname(__FILE__) + '/../../spec_helper' - -require 'puppet/file_serving/fileset' - -describe Puppet::FileServing::Fileset do - it "should be able to recurse on a single file" do - @path = Tempfile.new("fileset_integration") - - fileset = Puppet::FileServing::Fileset.new(@path.path) - lambda { fileset.files }.should_not raise_error - end -end diff --git a/spec/integration/file_serving/fileset_spec.rb b/spec/integration/file_serving/fileset_spec.rb new file mode 100755 index 000000000..80bf0f376 --- /dev/null +++ b/spec/integration/file_serving/fileset_spec.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../spec_helper' + +require 'puppet/file_serving/fileset' + +describe Puppet::FileServing::Fileset do + it "should be able to recurse on a single file" do + @path = Tempfile.new("fileset_integration") + + fileset = Puppet::FileServing::Fileset.new(@path.path) + lambda { fileset.files }.should_not raise_error + end +end diff --git a/spec/integration/file_serving/metadata.rb b/spec/integration/file_serving/metadata.rb deleted file mode 100755 index bd105e412..000000000 --- a/spec/integration/file_serving/metadata.rb +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env ruby -# -# Created by Luke Kanies on 2007-10-18. -# Copyright (c) 2007. All rights reserved. - -require File.dirname(__FILE__) + '/../../spec_helper' - -require 'puppet/file_serving/metadata' -require 'shared_behaviours/file_serving' -require 'puppet/indirector/file_metadata/file_server' - -describe Puppet::FileServing::Metadata, " when finding files" do - it_should_behave_like "Puppet::FileServing::Files" - - before do - @test_class = Puppet::FileServing::Metadata - @indirection = Puppet::FileServing::Metadata.indirection - end - - after { Puppet::Util::Cacher.expire } -end diff --git a/spec/integration/file_serving/metadata_spec.rb b/spec/integration/file_serving/metadata_spec.rb new file mode 100755 index 000000000..bd105e412 --- /dev/null +++ b/spec/integration/file_serving/metadata_spec.rb @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby +# +# Created by Luke Kanies on 2007-10-18. +# Copyright (c) 2007. All rights reserved. + +require File.dirname(__FILE__) + '/../../spec_helper' + +require 'puppet/file_serving/metadata' +require 'shared_behaviours/file_serving' +require 'puppet/indirector/file_metadata/file_server' + +describe Puppet::FileServing::Metadata, " when finding files" do + it_should_behave_like "Puppet::FileServing::Files" + + before do + @test_class = Puppet::FileServing::Metadata + @indirection = Puppet::FileServing::Metadata.indirection + end + + after { Puppet::Util::Cacher.expire } +end diff --git a/spec/integration/file_serving/terminus_helper.rb b/spec/integration/file_serving/terminus_helper.rb deleted file mode 100755 index 7d2587af1..000000000 --- a/spec/integration/file_serving/terminus_helper.rb +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env ruby - -require File.dirname(__FILE__) + '/../../spec_helper' - -require 'puppet/file_serving/terminus_helper' - -class TerminusHelperIntegrationTester - include Puppet::FileServing::TerminusHelper - def model - Puppet::FileServing::Metadata - end -end - -describe Puppet::FileServing::TerminusHelper do - it "should be able to recurse on a single file" do - @path = Tempfile.new("fileset_integration") - request = Puppet::Indirector::Request.new(:metadata, :find, @path.path, :recurse => true) - - tester = TerminusHelperIntegrationTester.new - lambda { tester.path2instances(request, @path.path) }.should_not raise_error - end -end diff --git a/spec/integration/file_serving/terminus_helper_spec.rb b/spec/integration/file_serving/terminus_helper_spec.rb new file mode 100755 index 000000000..7d2587af1 --- /dev/null +++ b/spec/integration/file_serving/terminus_helper_spec.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../spec_helper' + +require 'puppet/file_serving/terminus_helper' + +class TerminusHelperIntegrationTester + include Puppet::FileServing::TerminusHelper + def model + Puppet::FileServing::Metadata + end +end + +describe Puppet::FileServing::TerminusHelper do + it "should be able to recurse on a single file" do + @path = Tempfile.new("fileset_integration") + request = Puppet::Indirector::Request.new(:metadata, :find, @path.path, :recurse => true) + + tester = TerminusHelperIntegrationTester.new + lambda { tester.path2instances(request, @path.path) }.should_not raise_error + end +end -- cgit