Class: TestUnitTesting

Inherits:
Test::Unit::TestCase show all
Defined in:
lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb

Constant Summary collapse

@@setup_callback_count =
0
@@setup_method_count =
0
@@teardown_callback_count =
0
@@teardown_method_count =
0
@@has_been_run =
false

Instance Attribute Summary

Attributes included from Spec::Example::ExampleGroupMethods

#location

Attributes included from Spec::Example::Subject::ExampleGroupMethods

#explicit_subject_block

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Test::Unit::TestCase

example_method?, #initialize, #run, suite, test_method?

Methods included from Spec::Example::ExampleGroupMethods

build_description_from, #describe, #described_class, #described_type, #description, #description_args, #description_parts, #example, #example_group_hierarchy, #example_implementations, #example_proxies, #examples, #include_constants_in, #inherited, #it_should_behave_like, #let, #nested_descriptions, #notify, #number_of_examples, #options, #pending_implementation, #run, #set_description, #xexample

Methods included from Spec::Example::ArgsAndOptions

#add_options, #args_and_options, #set_location

Methods included from Spec::Example::PredicateMatchers

#define_methods_from_predicate_matchers, #predicate_matchers

Methods included from Spec::Example::Subject::ExampleGroupMethods

#its, #subject

Methods included from Spec::Example::BeforeAndAfterHooks

#after_all_parts, #after_each_parts, after_suite_parts, #after_suite_parts, #append_after, #append_before, #before_all_parts, #before_each_parts, before_suite_parts, #before_suite_parts, #prepend_after, #prepend_before

Methods included from Spec::Example::ExampleMethods

#description, #eval_each_fail_fast, #eval_each_fail_slow, #execute, #expect, #initialize, #instance_variable_hash, #options, #run_after_each, #run_before_each, #set_instance_variables_from_hash, #violated

Methods included from Spec::Example::ModuleReopeningFix

#child_modules, #include, #included

Methods included from Spec::Example::Pending

#pending

Methods included from Spec::Matchers

#be, #be_a, #be_a_kind_of, #be_an_instance_of, #be_close, #change, clear_generated_description, #eql, #equal, #exception_from, #exist, #fail, #fail_with, generated_description, #have, #have_at_least, #have_at_most, #include, #map_specs, #match, #method_missing, #raise_error, #respond_to, #run_with, #satisfy, #simple_matcher, #throw_symbol, #with_ruby, #wrap_expectation

Methods included from Spec::Matchers::DSL

#create, #define

Methods included from Spec::Example::Subject::ExampleMethods

#__should_for_example_group__, #__should_not_for_example_group__, #should, #should_not, #subject

Constructor Details

This class inherits a constructor from Test::Unit::TestCase

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Spec::Matchers

Class Method Details

.run(options = Spec::Runner.options) ⇒ Object



21
22
23
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 21

def self.run(options=Spec::Runner.options)
  super options
end

.run?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 17

def self.run?
  @@has_been_run
end

Instance Method Details

#do_some_setupObject



25
26
27
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 25

def do_some_setup
  @@setup_callback_count += 1
end

#do_some_teardownObject



42
43
44
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 42

def do_some_teardown
  @@teardown_callback_count += 1
end

#setupObject



29
30
31
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 29

def setup
  @@setup_method_count += 1
end

#teardownObject



38
39
40
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 38

def teardown
  @@teardown_method_count += 1
end

#test_somethingObject



33
34
35
36
# File 'lib/vendor/plugins/rspec-rails/spec/spec/rails/interop/testcase_spec.rb', line 33

def test_something
  assert_equal true, true
  @@has_been_run = true
end