diff --git a/spec/dummy/spec/decorators/post_decorator_spec.rb b/spec/dummy/spec/decorators/post_decorator_spec.rb index 97feeb5..e90011c 100755 --- a/spec/dummy/spec/decorators/post_decorator_spec.rb +++ b/spec/dummy/spec/decorators/post_decorator_spec.rb @@ -42,11 +42,12 @@ describe PostDecorator do it "serializes to JSON" do json = decorator.to_json - expect(json).to match /^{"post":{.+}}$/ expect(json).to match /"updated_at":"overridden"/ end it "serializes to XML" do + # Rails < 3.2 does not use `serializable_hash` in `to_xml` + pending if Rails.version.to_f < 3.2 xml = Capybara.string(decorator.to_xml) expect(xml).to have_css "post > updated-at", text: "overridden" end