diff options
author | John Keiser <jkeiser@opscode.com> | 2013-09-10 15:08:27 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-09-10 15:08:27 -0700 |
commit | c41db69a4d58e247c812849fb5a8b185ba9e4e42 (patch) | |
tree | b9db66a08352bac610a9c46b35e8e56fb4ecb4bf | |
parent | bd1b974ec6a8bdae3c8a1f6ba45fa1be77b49ea3 (diff) | |
download | mixlib-config-c41db69a4d58e247c812849fb5a8b185ba9e4e42.tar.gz |
Update tests for new rspec
-rw-r--r-- | spec/mixlib/config_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/mixlib/config_spec.rb b/spec/mixlib/config_spec.rb index ecd7148..fd29efb 100644 --- a/spec/mixlib/config_spec.rb +++ b/spec/mixlib/config_spec.rb @@ -32,9 +32,9 @@ describe Mixlib::Config do end it "should load a config file" do - File.stub!(:exists?).and_return(true) - File.stub!(:readable?).and_return(true) - IO.stub!(:read).with('config.rb').and_return("alpha = 'omega'\nfoo = 'bar'") + File.stub(:exists?).and_return(true) + File.stub(:readable?).and_return(true) + IO.stub(:read).with('config.rb').and_return("alpha = 'omega'\nfoo = 'bar'") lambda { ConfigIt.from_file('config.rb') }.should_not raise_error @@ -43,7 +43,7 @@ describe Mixlib::Config do it "should not raise an ArgumentError with an explanation if you try and set a non-existent variable" do lambda { ConfigIt[:foobar] = "blah" - }.should_not raise_error(ArgumentError) + }.should_not raise_error end it "should raise an Errno::ENOENT if it can't find the file" do @@ -53,7 +53,7 @@ describe Mixlib::Config do end it "should allow the error to bubble up when it's anything other than IOError" do - IO.stub!(:read).with('config.rb').and_return("@#asdf") + IO.stub(:read).with('config.rb').and_return("@#asdf") lambda { ConfigIt.from_file('config.rb') }.should raise_error(SyntaxError) @@ -129,7 +129,7 @@ describe Mixlib::Config do end it "should not raise an ArgumentError if you access a config option that does not exist" do - lambda { ConfigIt[:snob_hobbery] }.should_not raise_error(ArgumentError) + lambda { ConfigIt[:snob_hobbery] }.should_not raise_error end it "should return true or false with has_key?" do @@ -165,7 +165,7 @@ describe Mixlib::Config do end it "should multiply an integer by 1000 via from-file, too" do - IO.stub!(:read).with('config.rb').and_return("test_method 99") + IO.stub(:read).with('config.rb').and_return("test_method 99") @klass.from_file('config.rb') @klass.test_method.should == 99000 end |