1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

Fix failing specs

This commit is contained in:
Andrew Haines 2013-01-31 22:48:47 +00:00
parent 75dcfd7b81
commit 734e376a23

View file

@ -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