Sha256: 6bca0fb8eadfceab66245564ce92a73a9c3da955b56aff842165eb300fadb245

Contents?: true

Size: 501 Bytes

Versions: 10

Compression:

Stored size: 501 Bytes

Contents

require 'teststrap'

context "A respond_to assertion macro" do
  setup { Riot::Assertion.new("foo") { "bar" } }

  assertion_test_passes("when method is defined", "responds to :each_byte") { topic.respond_to(:each_byte) }
  assertion_test_passes("using responds_to alias", "responds to :length") { topic.responds_to(:length) }

  assertion_test_fails("when method not defined", "expected method :goofballs is not defined") do
    topic.respond_to(:goofballs)
  end

end # A respond_to assertion macro

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
riot-0.11.4 test/core/assertion_macros/respond_to_test.rb
riot-0.11.4.pre test/core/assertion_macros/respond_to_test.rb
riot-0.11.3 test/core/assertion_macros/respond_to_test.rb
riot-0.11.2 test/core/assertion_macros/respond_to_test.rb
riot-0.11.1 test/core/assertion_macros/respond_to_test.rb
riot-0.11.0 test/core/assertion_macros/respond_to_test.rb
riot-0.10.13 test/core/assertion_macros/respond_to_test.rb
riot-0.10.13.pre test/core/assertion_macros/respond_to_test.rb
riot-0.10.12 test/core/assertion_macros/respond_to_test.rb
riot-0.10.12.pre test/assertion_macros/respond_to_test.rb