Class: Merb::Test::ExampleGroup
- Inherits:
-
Spec::Example::ExampleGroup
- Object
- Spec::Example::ExampleGroup
- Merb::Test::ExampleGroup
- Includes:
- ControllerHelper, Matchers, RouteHelper, Webrat::Methods
- Defined in:
- lib/merb-core/test/test_ext/rspec.rb
Class Method Summary collapse
-
.describe(*args, &example_group_block) ⇒ Object
(also: context)
This is a copy of the method in rspec, so we can have describe “…”, :when => “logged in”, and the like.
- .given(*args, &example_group_block) ⇒ Object
Methods included from MultipartRequestHelper
#dispatch_multipart_to, #multipart_fake_request, #multipart_post, #multipart_put, #multipart_request
Methods included from RequestHelper
#build_request, #check_request_for_route, #delete, #describe_input, #describe_request, #dispatch_request, #dispatch_to, #dispatch_with_basic_authentication_to, #fake_request, #get, #merge_controller_and_action, #mock_request, #post, #put, #requesting, #response_for, #status_code, #with_cookies
Methods included from MakeRequest
Methods included from RouteHelper
Class Method Details
.describe(*args, &example_group_block) ⇒ Object Also known as: context
This is a copy of the method in rspec, so we can have describe “…”, :when => “logged in”, and the like
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/merb-core/test/test_ext/rspec.rb', line 54 def describe(*args, &example_group_block) ret = super params = args.last.is_a?(Hash) ? args.last : {} if example_group_block params[:when] = params[:when] || params[:given] [params[:when]].flatten.compact.each do |w| ret.module_eval %{it_should_behave_like "#{w}"} end end end |