On Jul 25, 2009, at 4:13 PM, Markus wrote:

>
> From: MarkusQ <[email protected]>
>
>
> Signed-off-by: MarkusQ <[email protected]>
> ---
> spec/integration/network/formats.rb |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/spec/integration/network/formats.rb b/spec/integration/ 
> network/formats.rb
> index 77a972b..3ea26f5 100755
> --- a/spec/integration/network/formats.rb
> +++ b/spec/integration/network/formats.rb
> @@ -7,7 +7,7 @@ require 'puppet/network/formats'
> class JsonIntTest
>     attr_accessor :string
>     def ==(other)
> -        string == (other.respond_to? :string) ? other.string :  
> other.inspect
> +        other.class == self.class and string == other.string
>     end
>
>     def self.from_json(data)
> @@ -75,6 +75,8 @@ describe  
> Puppet::Network::FormatHandler.format(:json) do
>         end
>
>         it "should be able to render multiple instances to json" do
> +            Puppet.features.add(:json, :libs => ["json"])
> +
>             one = JsonIntTest.new("one")
>             two = JsonIntTest.new("two")


I think this isn't quite the right fix.  Load the 'rails' feature,  
then the json feature should just load.  The reason we load the rails  
feature first is because Rails has its own stupid json support and  
it's incompatible.  So, we load rails, then overwrite its json support  
with the builtin lib.

So just do something like this:

   before do
     Puppet.features.rails?
   end


-- 
It is well to remember that the entire universe, with one trifling
exception, is composed of others. --John Andrew Holmes
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to