Sha256: 12c8deedfab996ed17f650710e04cb2da1a5d1de9c36af48ea0d61a3b672655b

Contents?: true

Size: 1.16 KB

Versions: 18

Compression:

Stored size: 1.16 KB

Contents

require 'teststrap'

context "An AssertionMacro instance" do
  setup { Riot::AssertionMacro.new }

  asserts_topic.responds_to(:new_message)
  asserts_topic.responds_to(:expected_message)
  asserts_topic.responds_to(:should_have_message)
  asserts_topic.responds_to(:line)
  asserts_topic.responds_to(:line=)
  asserts_topic.responds_to(:file)
  asserts_topic.responds_to(:file=)

  context "receiving #new_message" do
    setup { topic.new_message("hope") }

    asserts_topic.kind_of(Riot::Message)
    asserts(:to_s).equals(%q["hope"])
  end

  context "receiving #should_have_message" do
    setup { topic.should_have_message("hope") }

    asserts_topic.kind_of(Riot::Message)
    asserts(:to_s).equals(%q[should have "hope"])
  end

  context "receiving #expected_message" do
    setup { topic.expected_message("hope") }

    asserts_topic.kind_of(Riot::Message)
    asserts(:to_s).equals(%q[expected "hope"])
  end
end # An AssertionMacro instance

context "AssertionMacro#fail" do
  setup do
    macro = Riot::AssertionMacro.new
    macro.line = 5
    macro.file = "foo"
    macro.fail("")
  end

  asserts_topic.includes(5)
  asserts_topic.includes("foo")
end # AssertionMacro#fail

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
riot-0.12.7 test/core/runnable/assertion_macro_test.rb
riot-0.12.6 test/core/runnable/assertion_macro_test.rb
riot-0.12.5 test/core/runnable/assertion_macro_test.rb
riot-0.12.4 test/core/runnable/assertion_macro_test.rb
riot-0.12.3 test/core/runnable/assertion_macro_test.rb
riot-0.12.2 test/core/runnable/assertion_macro_test.rb
riot-0.12.1 test/core/runnable/assertion_macro_test.rb
riot-0.12.0 test/core/runnable/assertion_macro_test.rb
riot-0.12.0.pre test/core/runnable/assertion_macro_test.rb
riot-0.11.4 test/core/assertion_macro_test.rb
riot-0.11.4.pre test/core/assertion_macro_test.rb
riot-0.11.3 test/core/assertion_macro_test.rb
riot-0.11.2 test/core/assertion_macro_test.rb
riot-0.11.1 test/core/assertion_macro_test.rb
riot-0.11.0 test/core/assertion_macro_test.rb
riot-0.10.13 test/core/assertion_macro_test.rb
riot-0.10.13.pre test/core/assertion_macro_test.rb
riot-0.10.12 test/core/assertion_macro_test.rb