Sha256: 5dca7a0a68297fd725c0e6c358160a22d5d00d726b202fa09a781a186a507d3f
Contents?: true
Size: 1.32 KB
Versions: 5
Compression:
Stored size: 1.32 KB
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 context "The denies_topic shortcut" do setup do Riot::Context.new("foo") {}.denies_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("not bar").run(situation) end.equals([:pass, %Q{is equal to "not bar" when it is "bar"}]) asserts(:to_s).equals("denies that it") context "with an explicit description" do setup { Riot::Context.new("foo") {}.denies_topic("get some") } asserts(:to_s).equals("denies get some") end end # The denies_topic shortcut
Version data entries
5 entries across 5 versions & 1 rubygems