spec/models/landable/page_spec.rb in landable-1.7.1.rc1 vs spec/models/landable/page_spec.rb in landable-1.8.0
- old
+ new
@@ -110,10 +110,12 @@
it { subject.should have_valid(:meta_tags).when(nil) }
specify "quacks like a Hash" do
# Note the change from symbol to string; thus, always favor strings.
page = create :page, meta_tags: { keywords: 'foo' }
- page.meta_tags.keys.should == [:keywords]
+
+ # rails 4.0 preserves the symbol for this instance; rails 4.1 switches straight to strings
+ page.meta_tags.keys.map(&:to_s).should == ['keywords']
tags = Page.first.meta_tags
tags.should be_a(Enumerable)
tags.keys.should == ['keywords']
tags.values.should == ['foo']