require 'spec_helper'
class SomeMockResource
include YamlStoreStrategy
def run_private_methods_from_module
update_yaml("blablabla" => "foo")
result_hash_from_yaml
end
end
describe SomeMockResource do
before do
@some_mock_resource = SomeMockResource.new
end
it "should run the private methods from module" do
@some_mock_resource.run_private_methods_from_module
end
it "should update_yaml , then query from yaml" do
purpose = "test if the module works"
@some_mock_resource.send(:update_yaml,{"name"=>"some resource", "purpose"=> purpose})
@some_mock_resource.send(:result_hash_from_yaml)["purpose"].should == purpose
end
end