summaryrefslogtreecommitdiff
path: root/spec/unit/dsl/regsitry_helper_spec.rb
diff options
context:
space:
mode:
authorPrajaktaPurohit <prajakta@opscode.com>2012-12-10 15:32:19 -0800
committerLamont Granquist <lamont@opscode.com>2012-12-19 15:56:12 -0800
commit4ecbd2d5ff1f1cebb363ac7d56008a497dfee758 (patch)
tree6fc4e5738d056aa928fbd8539cc4ab59931074b3 /spec/unit/dsl/regsitry_helper_spec.rb
parent0dcfe92be0671a6bd460bb59b41d8dbae9ec3e88 (diff)
downloadchef-4ecbd2d5ff1f1cebb363ac7d56008a497dfee758.tar.gz
Changing verbiage for unit tests and creating a resource object instead of a file resource object
Diffstat (limited to 'spec/unit/dsl/regsitry_helper_spec.rb')
-rw-r--r--spec/unit/dsl/regsitry_helper_spec.rb19
1 files changed, 7 insertions, 12 deletions
diff --git a/spec/unit/dsl/regsitry_helper_spec.rb b/spec/unit/dsl/regsitry_helper_spec.rb
index 877d4e6f28..7fe08e310f 100644
--- a/spec/unit/dsl/regsitry_helper_spec.rb
+++ b/spec/unit/dsl/regsitry_helper_spec.rb
@@ -20,10 +20,6 @@ require "chef/dsl/registry_helper"
require "spec_helper"
describe Chef::Resource::RegistryKey do
- include_context Chef::Resource::File
-
- let(:file_base) { "file_spec" }
- let(:expected_content) { "Don't fear the ruby." }
before (:all) do
events = Chef::EventDispatch::Dispatcher.new
@@ -32,27 +28,26 @@ describe Chef::Resource::RegistryKey do
ohai.all_plugins
node.consume_external_attrs(ohai.data,{})
run_context = Chef::RunContext.new(node, {}, events)
- @resource = Chef::Resource::File.new(path, run_context)
- @resource.content(expected_content)
+ @resource = Chef::Resource::new("foo", run_context)
end
context "tests registry dsl" do
- it "creates file file if registry_key_exists" do
+ it "resource can access registry_helper method registry_key_exists" do
@resource.respond_to?('registry_key_exists?').should == true
end
- it "deletes file if registry has specified value" do
+ it "resource can access registry_helper method registry_get_values" do
@resource.respond_to?('registry_get_values').should == true
end
- it "creates file if specified registry_has_subkey" do
+ it "resource can access registry_helper method registry_has_subkey" do
@resource.respond_to?('registry_has_subkeys?').should == true
end
- it "deletes file if specified key has specified subkey" do
+ it "resource can access registry_helper method registry_get_subkeys" do
@resource.respond_to?('registry_get_subkeys').should == true
end
- it "creates file if registry_value_exists" do
+ it "resource can access registry_helper method registry_value_exists" do
@resource.respond_to?('registry_value_exists?').should == true
end
- it "deletes file if data_value_exists" do
+ it "resource can access registry_helper method data_value_exists" do
@resource.respond_to?('registry_data_exists?').should == true
end
end