Class Index [+]

Quicksearch

Spec::Example::SharedExampleGroup::ClassMethods

Public Instance Methods

clear() click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 15
15:         def clear
16:           shared_example_groups.clear
17:         end
count() click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 23
23:         def count
24:           shared_example_groups.length
25:         end
find(example_group_description) click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 11
11:         def find(example_group_description)
12:           shared_example_groups.find {|b| b.description == example_group_description}
13:         end
include?(group) click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 19
19:         def include?(group)
20:           shared_example_groups.include?(group)
21:         end
register(*args, &block) click to toggle source
   # File lib/spec/example/shared_example_group.rb, line 5
5:         def register(*args, &block)
6:           new_example_group = new(*args, &block)
7:           shared_example_groups << new_example_group unless already_registered?(new_example_group)
8:           new_example_group
9:         end

Private Instance Methods

already_registered?(new_example_group) click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 33
33:         def already_registered?(new_example_group)
34:           existing_example_group = find(new_example_group.description)
35:           return false unless existing_example_group
36:           return true if new_example_group.equal?(existing_example_group)
37:           return true if expanded_path(new_example_group) == expanded_path(existing_example_group)
38:           raise ArgumentError.new("Shared Example '#{existing_example_group.description}' already exists")
39:         end
expanded_path(example_group) click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 41
41:         def expanded_path(example_group)
42:           File.expand_path(example_group.location)
43:         end
shared_example_groups() click to toggle source
    # File lib/spec/example/shared_example_group.rb, line 29
29:         def shared_example_groups
30:           @shared_example_groups ||= []
31:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.