Methods
- M
- S
- T
Instance Public methods
method_missing(name, *args)
Link
setup()
Link
test_does_not_prevent_method_missing_passing_up_to_ancestors()
Link
RSpec mixes Matchers (which has a method_missing) into IntegrationTest's superclass. Make sure IntegrationTest does not try to delegate these methods to the session object.
# File actionpack/test/controller/integration_test.rb, line 209 def test_does_not_prevent_method_missing_passing_up_to_ancestors mixin = Module.new do def method_missing(name, *args) name.to_s == 'foo' ? 'pass' : super end end @test.class.superclass.__send__(:include, mixin) begin assert_equal 'pass', @test.foo ensure # leave other tests as unaffected as possible mixin.__send__(:remove_method, :method_missing) end end
test_opens_new_session()
Link
# File actionpack/test/controller/integration_test.rb, line 197 def test_opens_new_session session1 = @test.open_session { |sess| } session2 = @test.open_session # implicit session assert_respond_to session1, :assert_template, "open_session makes assert_template available" assert_respond_to session2, :assert_template, "open_session makes assert_template available" assert !session1.equal?(session2) end