Skip to content

Instantly share code, notes, and snippets.

1)
Spec::Mocks::MockExpectationError in 'Ohai::System Darwin plugin platform should run sw_vers'
Mock 'Ohai::System' expected :popen4 with ("sw_vers") but received it with ("/usr/bin/sw_vers")
/Users/pnasrat/Development/ohai/lib/ohai/plugins/darwin/platform.rb:19:in `from_file'
/Users/pnasrat/Development/ohai/spec/../lib/ohai/system.rb:117:in `_require_plugin'
/Users/pnasrat/Development/ohai/spec/../lib/ohai/system.rb:112:in `each'
/Users/pnasrat/Development/ohai/spec/../lib/ohai/system.rb:112:in `_require_plugin'
./spec/ohai/plugins/darwin/platform_spec.rb:40:
2)
1)
Spec::Mocks::MockExpectationError in 'Chef::Provider::Service::Debian load_current_resource should close stdin on the update-rc.d command'
Mock 'Chef::Provider::Service::Debian' expected :popen4 with (any args) once, but received it twice
./spec/unit/provider/service/debian_service_spec.rb:63:
Finished in 1.234246 seconds
824 examples, 1 failure
spec spec/ohai/system_spec.rb spec/ohai/plugins/ohai_time_spec.rb
...............FFF
1)
Spec::Mocks::MockExpectationError in 'Ohai::System plugin ohai_time should get the current time'
Mock 'Class' expected :now with (any args) once, but received it 0 times
./spec/ohai/plugins/ohai_time_spec.rb:29:
2)
Spec::Mocks::MockExpectationError in 'Ohai::System plugin ohai_time should turn the time into a floating point number'
Paul-Nasrats-Computer:facter pnasrat$ ruby -Ilib bin/facter interfaces
Paul-Nasrats-Computer:facter pnasrat$ git mv lib/facter/ipmess.rb lib/facter/interfaces.rb
Paul-Nasrats-Computer:facter pnasrat$ ruby -Ilib bin/facter interfaces
lo0,gif0,stf0,en0,fw0,en1,vmnet8,vmnet1
#!/usr/bin/python
class ValidatedClass:
def __init__(self, a, b, c, d, e, f, g):
if not self.checkval(b):
raise ValueError("b must be less than 10")
def checkval(self, val):
return val < 10
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index a0b0fbe..2b2aadc 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -20,7 +20,7 @@ Puppet::Type.newtype(:tidy) do
end
newparam(:matches) do
- desc "One or more (shell type) file glob patterns, which restrict
+ desc %q{One or more (shell type) file glob patterns, which restrict
#!/usr/bin/env ruby
# Find and load the spec file.
Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
provider = Puppet::Type.type(:service).provider(:init)
describe provider do
describe "when running on FreeBSD" do
confine "Not running on FreeBSD" => (Facter.value(:operatingsystem) == "FreeBSD")
@pnasrat
pnasrat / gist:107393
Created May 6, 2009 06:31
Trying to add operatingsystem tests
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../spec_helper'
require 'facter'
describe "Operating System fact" do
before do
Facter.loadfacts
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../spec_helper'
require 'facter'
describe "Operating System fact" do
after do
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../spec_helper'
require 'facter'
describe "Operating System fact" do
after do