spec/unit/plugins/root_group_spec.rb in ohai-7.2.0.alpha.0 vs spec/unit/plugins/root_group_spec.rb in ohai-7.2.0.rc.0
- old
+ new
@@ -15,10 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
+require File.expand_path(File.dirname(__FILE__) + '/../../../lib/ohai/util/win32/group_helper.rb')
describe Ohai::System, 'root_group' do
before(:each) do
@plugin = get_plugin("root_group")
end
@@ -74,15 +75,14 @@
@plugin[:root_group].should == 'system'
end
end
end
- describe 'windows', :windows_only do
-
- # TODO: Not implemented on windows.
- # See also:
- #
- # http://tickets.opscode.com/browse/OHAI-490
- # http://tickets.opscode.com/browse/OHAI-491
-
+ describe 'windows platform' do
+ it 'should return the group administrators' do
+ stub_const('::RbConfig::CONFIG', { 'host_os' => 'windows'} )
+ Ohai::Util::Win32::GroupHelper.should_receive(:windows_root_group_name).and_return('administrators')
+ @plugin.run
+ @plugin[:root_group].should == 'administrators'
+ end
end
end