Sha256: f5c418fa9a5f7a03677e0b6a29c397feb66d18b135e2999675aa957cc2c1018c

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

describe "pseudo classes" do

  it "adds tag to :body when used outside of :style" do
    target :body, <<-EOF
      <a id="main" href="&#47;test">test</a>
    EOF
    actual do
      a.id(:main).href("/test") { 
        style {
          _link { color '#fff' }
        }
        "test"
      }
    end
  end # === it adds tag to :body when used outside of :style

  it "uses :id in :style tag if specified" do
    target :style, <<-EOF
      #main:link {
        color: #ffc;
      }
    EOF
    actual do
      a.id(:main).href("/test") { 
        style {
          _link { color '#ffc' }
        }
        "test"
      }
    end
  end # === it uses :id in :style tag if specified

  it "allows multiple pseudos" do
    target :style, <<-EOF
      a:link, a:visited {
        color: #fff;
      }

      a:hover {
        color: #ccc;
      }
    EOF
    actual do
      style {
        a {
          _link / _visited   { color '#fff' }
          _hover { color '#ccc' }
        }
      }
    end
  end # === it allows multiple pseudos when used inside a style tag

end # === describe :pseudo_classes

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
www_app-2.3.0 specs/server-side/0041-pseudo.rb
www_app-2.1.3 specs/server-side/0041-pseudo.rb
www_app-2.1.1 specs/server-side/0041-pseudo.rb
www_app-2.1.0 specs/server-side/0041-pseudo.rb
www_app-2.0.2 specs/server-side/0041-pseudo.rb
www_app-2.0.1 specs/server-side/0041-pseudo.rb
www_app-2.0.0 specs/server-side/0041-pseudo.rb