Fix failing specs

This commit is contained in:
Andrew Haines 2013-01-31 22:48:47 +00:00
parent 75dcfd7b81
commit 734e376a23
1 changed files with 2 additions and 1 deletions

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