Sha256: 489a24a09196568615d76f59893c94c0567558a458eb854900ad8a1ea90e7c90
Contents?: true
Size: 996 Bytes
Versions: 6
Compression:
Stored size: 996 Bytes
Contents
require 'bundler/setup' require 'meta_tags' shared_examples_for '.set_meta_tags' do it 'should update meta tags' do subject.set_meta_tags(:title => 'hello') subject.meta_tags[:title].should == 'hello' subject.set_meta_tags(:title => 'world') subject.meta_tags[:title].should == 'world' end it 'should use deep merge when updating meta tags' do subject.set_meta_tags(:og => { :title => 'hello' }) subject.meta_tags[:og].should == { 'title' => 'hello' } subject.set_meta_tags(:og => { :description => 'world' }) subject.meta_tags[:og].should == { 'title' => 'hello', 'description' => 'world' } subject.set_meta_tags(:og => { :admin => { :id => 1 } } ) subject.meta_tags[:og].should == { 'title' => 'hello', 'description' => 'world', 'admin' => { 'id' => 1 } } end it 'should normalize :open_graph to :og' do subject.set_meta_tags(:open_graph => { :title => 'hello' }) subject.meta_tags[:og].should == { 'title' => 'hello' } end end
Version data entries
6 entries across 6 versions & 1 rubygems