Sha256: 3c04b322b7640d5e26e284e7b3dded4ffe6a1b24616d5d9e411099b4c8dd91bf

Contents?: true

Size: 674 Bytes

Versions: 4

Compression:

Stored size: 674 Bytes

Contents

require 'teststrap'

context "The asserts_topic shortcut" do
  setup do
    Riot::Context.new("foo") {}.asserts_topic
  end

  should("return an Assertion") { topic }.kind_of(Riot::Assertion)

  should("return the actual topic as the result of evaling the assertion") do
    (situation = Riot::Situation.new).instance_variable_set(:@_topic, "bar")
    topic.equals("bar").run(situation)
  end.equals([:pass, %Q{is equal to "bar"}])

  asserts(:to_s).equals("asserts that it")

  context "with an explicit description" do
    setup { Riot::Context.new("foo") {}.asserts_topic("get some") }
    asserts(:to_s).equals("asserts get some")
  end
end # The asserts_topic shortcut

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
riot-0.12.2 test/core/context/asserts_topic_test.rb
riot-0.12.1 test/core/context/asserts_topic_test.rb
riot-0.12.0 test/core/context/asserts_topic_test.rb
riot-0.12.0.pre test/core/context/asserts_topic_test.rb