test/test_attributes.rb in attrtastic-0.3.3 vs test/test_attributes.rb in attrtastic-0.4.0

- old
+ new

@@ -40,11 +40,11 @@ end should "show header" do expected = html <<-EOHTML <div class="attributes"> - <div class="legend">Legend</div> + <div class="legend"><span>Legend</span></div> <ol> </ol> </div> EOHTML actual = @user_builder.attributes "Legend" do end @@ -80,11 +80,11 @@ end should "show header" do expected = html <<-EOHTML <div class="attributes contact"> - <div class="legend">Contact</div> + <div class="legend"><span>Contact</span></div> <ol> <li class="attribute"> <span class="label">Full name</span> <span class="value">Doe, John</span> </li> @@ -122,10 +122,11 @@ should "allow to access inner object" do @blog_builder.attributes :for => :author do |author| assert_equal @blog.author, author.record + assert_equal @blog.author, author.object end end should "generate output for given inner object" do @@ -154,11 +155,11 @@ end should "show header" do expected = html <<-EOHTML <div class="attributes user"> - <div class="legend">Author</div> + <div class="legend"><span>Author</span></div> <ol> </ol> </div> EOHTML actual = @blog_builder.attributes "Author", :for => :author do |author| @@ -188,10 +189,11 @@ should "allow to acces given object" do @blog_builder.attributes :for => @user do |author| assert_equal @user, author.record + assert_equal @user, author.object end end should "generate output for given inner object" do @@ -223,11 +225,11 @@ actual = @blog_builder.attributes "Author", :for => @user do |author| end expected = html <<-EOHTML <div class="attributes user"> - <div class="legend">Author</div> + <div class="legend"><span>Author</span></div> <ol> </ol> </div> EOHTML @@ -283,16 +285,16 @@ end should "show header" do expected = html <<-EOHTML <div class="attributes post"> - <div class="legend">Post</div> + <div class="legend"><span>Post</span></div> <ol> </ol> </div> <div class="attributes post"> - <div class="legend">Post</div> + <div class="legend"><span>Post</span></div> <ol> </ol> </div> EOHTML actual = @blog_builder.attributes "Post", :for => :posts do |post| @@ -358,15 +360,15 @@ end should "show header" do expected = html <<-EOHTML <div class="attributes post"> - <div class="legend">Post</div> + <div class="legend"><span>Post</span></div> <ol> </ol> </div> <div class="attributes post"> - <div class="legend">Post</div> + <div class="legend"><span>Post</span></div> <ol> </ol> </div> EOHTML actual = @blog_builder.attributes "Post", :for => @blog.posts do |post|