Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix specs for missing SortedSet #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aquarium/lib/aquarium/finders/pointcut_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def find_constant_pointcuts types, names = :all
con = t.const_get c
pointcuts.append_matched({t => con}) if con.kind_of?(Aquarium::Aspects::Pointcut)
end
rescue
next
end
end
pointcuts
Expand Down
2 changes: 2 additions & 0 deletions aquarium/lib/aquarium/utils/type_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def self.descendents clazz
result << mod if mod.ancestors.include?(clazz)
do_descendents clazz, mod, visited, result
end
rescue
next
end
result.uniq
end
Expand Down
4 changes: 2 additions & 2 deletions aquarium/spec/aquarium/aspects/aspect_invocation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ def public_test_method *args; @args=args; end
[:type, :type_and_descendents, :type_and_ancestors, :type_and_nested_types].each do |type_key|
it "should ignore the :default_objects if at least one :#{type_key} is given and the :default_objects are objects." do
object = Aquarium::AspectInvocationTestClass.new
aspect = Aspect.new(:after, :default_objects => object, type_key => Aquarium::AspectInvocationTestClass2, :method => :public_test_method, :method => :public_test_method) {true}
aspect = Aspect.new(:after, :default_objects => object, type_key => Aquarium::AspectInvocationTestClass2, :method => :public_test_method) {true}
aspect.join_points_matched.size.should == 1
aspect.join_points_matched.each {|jp| jp.type_or_object.should_not == object}
aspect.unadvise
end

it "should ignore the :default_objects if at least one :#{type_key} is given and the :default_objects are types." do
aspect = Aspect.new(:after, :default_objects => Aquarium::AspectInvocationTestClass, type_key => Aquarium::AspectInvocationTestClass2, :method => :public_test_method, :method => :public_test_method) {true}
aspect = Aspect.new(:after, :default_objects => Aquarium::AspectInvocationTestClass, type_key => Aquarium::AspectInvocationTestClass2, :method => :public_test_method) {true}
aspect.join_points_matched.size.should == 1
aspect.join_points_matched.each {|jp| jp.type_or_object.should_not == Aquarium::AspectInvocationTestClass}
aspect.unadvise
Expand Down