diff options
| author | AJ Christensen <aj@junglistheavy.industries> | 2014-12-30 11:39:55 +1300 |
|---|---|---|
| committer | Bryan McLellan <btm@opscode.com> | 2015-02-09 21:58:39 -0500 |
| commit | 95be9a0418b8db7b224092ef3e15282b5ae97eee (patch) | |
| tree | 02c5ef4fa4fac28adf1a0abe5033e7b2642b3274 /spec/unit/application | |
| parent | 955bce9ed05d6c69a37c506dc9e24a6e407e1a4d (diff) | |
| download | chef-95be9a0418b8db7b224092ef3e15282b5ae97eee.tar.gz | |
Refs #2709: Isolate/fix the no-fork fault
* Share specific recipes code to application parent
* Update specs to passing, update specs to RSpec 3.
* Specs for set_specific_recipes, solo, client.
Diffstat (limited to 'spec/unit/application')
| -rw-r--r-- | spec/unit/application/client_spec.rb | 7 | ||||
| -rw-r--r-- | spec/unit/application/solo_spec.rb | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index cce3d11577..894836198f 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -42,6 +42,13 @@ describe Chef::Application::Client, "reconfigure" do ARGV.replace(@original_argv) end + describe 'parse cli_arguments' do + it 'should call set_specific_recipes' do + expect(app).to receive(:set_specific_recipes).and_return(true) + app.reconfigure + end + end + describe "when configured to not fork the client process" do before do Chef::Config[:client_fork] = false diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb index 2a07ff38ad..1785ecfc86 100644 --- a/spec/unit/application/solo_spec.rb +++ b/spec/unit/application/solo_spec.rb @@ -34,6 +34,11 @@ describe Chef::Application::Solo do end describe "configuring the application" do + it 'should call set_specific_recipes' do + expect(app).to receive(:set_specific_recipes) + app.reconfigure + end + it "should set solo mode to true" do app.reconfigure expect(Chef::Config[:solo]).to be_truthy |
