Sha256: 70c2e0300a20f943dc4352a2a85051484468bc5af02e8a903401ca68d2677619

Contents?: true

Size: 860 Bytes

Versions: 60

Compression:

Stored size: 860 Bytes

Contents

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

describe "have_tag" do
  include Webrat::Matchers
  include Webrat::HaveTagMatcher

  before(:each) do
    @body = <<-HTML
      <div id='main'>
        <div class='inner'>hello, world!</div>
      </div>
    HTML
  end

  it "should be an alias for have_selector" do
    @body.should have_tag("div")
  end

  describe "asserts for tags" do
    include Test::Unit::Assertions

    before(:each) do
      should_receive(:response_body).and_return @body
      require 'test/unit'
    end

    describe "assert_have_tag" do
      it "should be an alias for assert_have_selector" do
        assert_have_tag("div")
      end
    end

    describe "assert_have_no_tag" do
      it "should be an alias for assert_have_no_selector" do
        assert_have_no_tag("p")
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 23 rubygems

Version Path
davidtrogers-webrat-0.4.4.2 spec/public/matchers/have_tag_spec.rb
diabolo-webrat-0.4.4.1 spec/public/matchers/have_tag_spec.rb
diabolo-webrat-0.4.4.2 spec/public/matchers/have_tag_spec.rb
diabolo-webrat-0.4.4 spec/public/matchers/have_tag_spec.rb
diabolo-webrat-0.5.1 spec/public/matchers/have_tag_spec.rb
dstrelau-webrat-0.5.1 spec/public/matchers/have_tag_spec.rb
emipair-webrat-0.0.1 spec/public/matchers/have_tag_spec.rb
hardbap-webrat-0.5.1 spec/public/matchers/have_tag_spec.rb
hardbap-webrat-0.5.2 spec/public/matchers/have_tag_spec.rb
raldred-webrat-0.4.4.2 spec/public/matchers/have_tag_spec.rb
sr-webrat-0.4.4.1 spec/public/matchers/have_tag_spec.rb
winton-sum-0.1.0 vendor/webrat/spec/public/matchers/have_tag_spec.rb
winton-sum-0.1.1 vendor/webrat/spec/public/matchers/have_tag_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/public/matchers/have_tag_spec.rb
indirect-webrat-0.7.5 spec/public/matchers/have_tag_spec.rb
indirect-webrat-0.7.4 spec/public/matchers/have_tag_spec.rb
webrat-0.7.3 spec/public/matchers/have_tag_spec.rb
jbd-webrat-0.7.2.rails3 spec/public/matchers/have_tag_spec.rb
webrat-0.7.2 spec/public/matchers/have_tag_spec.rb
webrat-0.7.2.beta.2 spec/public/matchers/have_tag_spec.rb