Class: Test::Unit::TestCase
- Defined in:
- lib/mack-notifier/testing.rb,
lib/gems/validatable-1.6.7/test/test_helper.rb
Overview
:nodoc:
Direct Known Subclasses
CallbacksTest, Caps::HelperTest, ClientTest, ConnectionErrorTest, DataFormsTest, Discovery::ResponderTest, ErrorTest, Functional::ValidatesAcceptanceOfTest, Functional::ValidatesConfirmationOfTest, Functional::ValidatesFormatOfTest, Functional::ValidatesLengthOfTest, Functional::ValidatesNumericalityOfTest, Functional::ValidatesPresenceOfTest, IBBTest, IdGeneratorTest, IqQueryTest, IqTest, IqVcardTest, JIDTest, Jabber::UserTune::TuneTest, JabberSimpleTest, MUCClientTest, MUCOwnerTest, MessageTest, PresenceTest, PubSub::NodeConfigTest, PubSub::ServiceHelperTest, PubSub::SubscriptionConfigTest, REXMLTest, RPC::HelperTest, Roster::HelperTest, Roster::IqQueryRosterTest, Roster::RosterItemTest, Roster::XRosterTest, SOCKS5BytestreamsTest, ServerErrorTest, SimpleMUCClientTest, StreamComponentTest, StreamParserTest, StreamSendTest, StreamTest, UserTune::HelperTest, Vcard::HelperTest, Version::HelperTest, Version::IqQueryVersionTest, XDelayTest, XHTML::HTMLTest, XMPPStanzaTest
Class Method Summary collapse
Instance Method Summary collapse
- #assert_array_equal(a, b) ⇒ Object
-
#run(result, &progress_block) ⇒ Object
We need to wrap the run method so we can do things like run a cleanup method if it exists.
Class Method Details
.expect(expected_value, &block) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gems/validatable-1.6.7/test/test_helper.rb', line 11 def expect(expected_value, &block) define_method :"test_#{caller.first.split("/").last}" do begin assert_equal expected_value, instance_eval(&block) rescue Exception => ex raise ex unless expected_value.is_a?(Class) && ex.is_a?(expected_value) assert_equal expected_value, ex.class end end end |
Instance Method Details
#assert_array_equal(a, b) ⇒ Object
24 25 26 |
# File 'lib/gems/validatable-1.6.7/test/test_helper.rb', line 24 def assert_array_equal a, b assert_equal Set.new(a), Set.new(b) end |
#run(result, &progress_block) ⇒ Object
We need to wrap the run method so we can do things like run a cleanup method if it exists
37 38 39 40 41 |
# File 'lib/mack-notifier/testing.rb', line 37 def run(result, &progress_block) # :nodoc: @__res = super_run(result) Mack::Notifier::DeliveryHandlers::Test::NotifierRegistry.reset! @__res end |