diff options
| author | Ian Taylor <ian@lorf.org> | 2009-06-05 12:39:04 -0400 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-06-06 09:12:00 +1000 |
| commit | 4f2c066a97e59a89df64af4b25beac6f3f0553c2 (patch) | |
| tree | 126540beec3c65448e01e1b48d27275ec4ee6ea4 /spec/unit/util | |
| parent | 97e6975d69f239e24993315a25a3117b1daa48c3 (diff) | |
| download | puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.gz puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.xz puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.zip | |
Removed extra whitespace from end of lines
Diffstat (limited to 'spec/unit/util')
| -rw-r--r-- | spec/unit/util/cache_accumulator.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/util/cacher.rb | 10 | ||||
| -rw-r--r-- | spec/unit/util/package.rb | 4 | ||||
| -rw-r--r-- | spec/unit/util/selinux.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/util/settings.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/util/storage.rb | 10 |
6 files changed, 17 insertions, 17 deletions
diff --git a/spec/unit/util/cache_accumulator.rb b/spec/unit/util/cache_accumulator.rb index 55ecb7e34..2d976d0b1 100644 --- a/spec/unit/util/cache_accumulator.rb +++ b/spec/unit/util/cache_accumulator.rb @@ -56,7 +56,7 @@ describe Puppet::Util::CacheAccumulator do name = 'foo' @test_class.expects(:find_or_create_by_name).with(name).returns(@test_class.new(name)).once @alt_class.expects(:find_or_create_by_name).with(name).returns(@alt_class.new(name)).once - + [@test_class, @alt_class].each do |klass| klass.accumulate_by_name(name).name.should == name klass.accumulate_by_name(name).class.should == klass diff --git a/spec/unit/util/cacher.rb b/spec/unit/util/cacher.rb index a1dd17adb..40688bc88 100755 --- a/spec/unit/util/cacher.rb +++ b/spec/unit/util/cacher.rb @@ -123,7 +123,7 @@ describe Puppet::Util::Cacher do it "should allow specification of a ttl for cached attributes" do klass = Class.new do - include Puppet::Util::Cacher + include Puppet::Util::Cacher end klass.cached_attr(:myattr, :ttl => 5) { Time.now } @@ -133,7 +133,7 @@ describe Puppet::Util::Cacher do it "should allow specification of a ttl as a string" do klass = Class.new do - include Puppet::Util::Cacher + include Puppet::Util::Cacher end klass.cached_attr(:myattr, :ttl => "5") { Time.now } @@ -143,7 +143,7 @@ describe Puppet::Util::Cacher do it "should fail helpfully if the ttl cannot be converted to an integer" do klass = Class.new do - include Puppet::Util::Cacher + include Puppet::Util::Cacher end lambda { klass.cached_attr(:myattr, :ttl => "yep") { Time.now } }.should raise_error(ArgumentError) @@ -151,7 +151,7 @@ describe Puppet::Util::Cacher do it "should not check for a ttl expiration if the class does not support that method" do klass = Class.new do - extend Puppet::Util::Cacher + extend Puppet::Util::Cacher end klass.metaclass.cached_attr(:myattr) { "eh" } @@ -163,7 +163,7 @@ describe Puppet::Util::Cacher do def self.to_s "CacheTestClass" end - include Puppet::Util::Cacher + include Puppet::Util::Cacher attr_accessor :value end diff --git a/spec/unit/util/package.rb b/spec/unit/util/package.rb index 7d956efb5..45eef4643 100644 --- a/spec/unit/util/package.rb +++ b/spec/unit/util/package.rb @@ -14,8 +14,8 @@ describe Puppet::Util::Package, " versioncmp" do ary = %w{ 1.1.6 2.3 1.1a 3.0 1.5 1 2.4 1.1-4 2.3.1 1.2 2.3.0 1.1-3 2.4b 2.4 2.40.2 2.3a.1 3.1 0002 1.1-5 1.1.a 1.06} newary = ary.sort { |a, b| Puppet::Util::Package.versioncmp(a,b) } - + newary.should == ["0002", "1", "1.06", "1.1-3", "1.1-4", "1.1-5", "1.1.6", "1.1.a", "1.1a", "1.2", "1.5", "2.3", "2.3.0", "2.3.1", "2.3a.1", "2.4", "2.4", "2.4b", "2.40.2", "3.0", "3.1"] end - + end diff --git a/spec/unit/util/selinux.rb b/spec/unit/util/selinux.rb index db3ee413a..d5ec6d2d4 100644 --- a/spec/unit/util/selinux.rb +++ b/spec/unit/util/selinux.rb @@ -49,7 +49,7 @@ describe Puppet::Util::SELinux do it "should match a path on / to ext3" do find_fs('/etc/puppet/testfile').should == "ext3" end - + it "should match a path on /mnt/nfs to nfs" do find_fs('/mnt/nfs/testfile/foobar').should == "nfs" end @@ -112,7 +112,7 @@ describe Puppet::Util::SELinux do self.expects(:find_fs).with("/foo").returns "nfs" get_selinux_default_context("/foo").should be_nil end - + end describe "parse_selinux_context" do diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index 0bf2dbb19..c700c0c5f 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' -describe Puppet::Util::Settings do +describe Puppet::Util::Settings do describe "when specifying defaults" do before do @settings = Puppet::Util::Settings.new @@ -521,7 +521,7 @@ describe Puppet::Util::Settings do # Now replace the value text = "[main]\none = disk-replace\n" - + # This is kinda ridiculous - the reason it parses twice is that # it goes to parse again when we ask for the value, because the # mock always says it should get reparsed. diff --git a/spec/unit/util/storage.rb b/spec/unit/util/storage.rb index 7fdc3650d..a7dea4001 100755 --- a/spec/unit/util/storage.rb +++ b/spec/unit/util/storage.rb @@ -95,7 +95,7 @@ describe Puppet::Util::Storage do @path = transient.path() transient.close!() end - + it "should not fail to load()" do FileTest.exists?(@path).should be_false() Puppet[:statedir] = @path @@ -109,10 +109,10 @@ describe Puppet::Util::Storage do Puppet::Util::Storage.cache(:yayness) Puppet::Util::Storage.state().should == {:yayness=>{}} - + Puppet[:statefile] = @path proc { Puppet::Util::Storage.load() }.should_not raise_error() - + Puppet::Util::Storage.state().should == {:yayness=>{}} end end @@ -140,7 +140,7 @@ describe Puppet::Util::Storage do proc { Puppet::Util::Storage.load() }.should_not raise_error() Puppet::Util::Storage.state().should == test_yaml end - + it "should initialize with a clear internal state if the state file does not contain valid YAML" do @state_file.write(:booness) @state_file.flush() @@ -184,7 +184,7 @@ describe Puppet::Util::Storage do proc { Puppet::Util::Storage.load() }.should_not raise_error() Puppet::Util::Storage.state().should == test_yaml end - + after(:each) do @state_file.close!() Puppet[:statefile] = @saved_statefile |
