Skip to content

Commit

Permalink
Merge branch 'master' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmario committed Sep 22, 2011
2 parents 6bf9dd0 + 8a17376 commit 7100fea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/encoding/encoding_spec.rb
Expand Up @@ -9,13 +9,13 @@ def to_json

class TheMindKiller
def to_json
@wait_i_dont_exist_this_is_a_horrible_mistake_dont_do_it_aiiiiiiiiieeeeeee
nil
end
end

class TheMindKillerDuce
def to_s
@wait_i_dont_exist_this_is_a_horrible_mistake_dont_do_it_aiiiiiiiiieeeeeee
nil
end
end

Expand Down Expand Up @@ -265,6 +265,9 @@ def to_s

it "return value of #to_s must be a string" do
lambda {
if TheMindKillerDuce.send(:method_defined?, :to_json)
TheMindKillerDuce.send(:undef_method, :to_json)
end
Yajl::Encoder.encode(TheMindKillerDuce.new)
}.should raise_error(TypeError)
end
Expand Down

0 comments on commit 7100fea

Please sign in to comment.