You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are should blocks following context blocks at the same level of nesting, the tests defined by the should blocks are executed more than once. The following example llustrates this:
require 'contest'
class FooTest < Test::Unit::TestCase
context "a" do
context "c" do
should "d" do
puts "B"
end
should "e" do
puts "C"
end
end
should "b" do
puts "A"
end
end
end
If this code is run, "A" will be printed twice.
The text was updated successfully, but these errors were encountered:
require "rubygems"
require "contest"
class InheritanceProblem < Test::Unit::TestCase
should "test1" do
puts "test1"
end
context "context1" do
should "context_test1" do
puts "context_test1"
end
end
should "test2" do
puts "test2"
end
end
If there are should blocks following context blocks at the same level of nesting, the tests defined by the should blocks are executed more than once. The following example llustrates this:
If this code is run, "A" will be printed twice.
The text was updated successfully, but these errors were encountered: