summaryrefslogtreecommitdiff
path: root/spec/functional/resource/powershell_spec.rb
diff options
context:
space:
mode:
authoradamedx <adamed@opscode.com>2013-06-24 00:03:46 -0700
committeradamedx <adamed@opscode.com>2013-06-25 06:05:11 -0700
commit5324bdd06ebaef013776950fb6ad97b78a8e9b1c (patch)
treef7e86986c79587dde7eb176a10398cd700dd8364 /spec/functional/resource/powershell_spec.rb
parent348c3dd86eb77e58e439cff780c5fd86c12daef7 (diff)
downloadchef-5324bdd06ebaef013776950fb6ad97b78a8e9b1c.tar.gz
OC-8337: Fix 32-bit OS test breaks
Diffstat (limited to 'spec/functional/resource/powershell_spec.rb')
-rw-r--r--spec/functional/resource/powershell_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/functional/resource/powershell_spec.rb b/spec/functional/resource/powershell_spec.rb
index 5cc904472b..26299913c3 100644
--- a/spec/functional/resource/powershell_spec.rb
+++ b/spec/functional/resource/powershell_spec.rb
@@ -55,22 +55,20 @@ describe Chef::Resource::WindowsScript::PowershellScript, :windows_only do
context "when running on a 32-bit version of Windows", :windows32_only do
- it "executes a script with a 32-bit process if a processor architecture :i386 is specified" do
+ it "executes a script with a 32-bit process if process architecture :i386 is specified" do
resource.code(native_architecture_script_content + " > #{script_output_path}")
resource.architecture(:i386)
resource.returns(0)
resource.run_action(:run)
- source_contains_case_insensitive_content?( get_script_content, 'x86' )
+ source_contains_case_insensitive_content?( get_script_output, 'x86' )
end
- it "executes raises an exception if :x86_64 process architecture is specified" do
- resource.code(native_architecture_script_content + " > #{script_output_path}")
- resource.architecture(:x86_64)
- resource.returns(0)
- resource.run_action(:run).should raise_error Chef::Exceptions::Win32ArchitectureIncorrect
-
- source_contains_case_insensitive_content?( get_script_output, 'x86' )
+ it "raises an exception if :x86_64 process architecture is specified" do
+ begin
+ resource.architecture(:x86_64).should raise_error Chef::Exceptions::Win32ArchitectureIncorrect
+ rescue Chef::Exceptions::Win32ArchitectureIncorrect
+ end
end
end