Sha256: 6bdaa3b76f8f3164002750ac28fd65c4dd744884455ee7dcda21cc582bb8f9a2

Contents?: true

Size: 664 Bytes

Versions: 4

Compression:

Stored size: 664 Bytes

Contents

require File.dirname(__FILE__) + "/../spec_helper"

describe Simply, "the method" do
  it "should take a block" do
    Simply do
      
    end
  end

  it "should produce html with the block" do
    s = Simply do
      br
    end

    s.should == "<br />"
  end
  
  it "should pass locals in" do
    s = Simply :locals => {:foo => "foo"} do
      text foo
    end
    
    s.should == "foo"
  end
  
  it "should pass indentation in" do
    s = Simply :indent => true do
      html do
        body do
          p "foo"
        end
      end
    end
    
    s.should == (<<-HERE).chomp
<html>
  <body>
    <p>
      foo
    </p>
  </body>
</html>
HERE
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
smtlaissezfaire-simply-0.1.1 spec/simply/simply_spec.rb
smtlaissezfaire-simply-0.2.1 spec/simply/simply_spec.rb
simply-0.2.3 spec/simply/simply_spec.rb
simply-0.1.3 spec/simply/simply_spec.rb