aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/module/shared/equal_value.rb
blob: f1227d873cf28b9eff1f524682c61f42a3e88122 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
describe :module_equal, shared: true do
  it "returns true if self and the given module are the same" do
    ModuleSpecs.send(@method, ModuleSpecs).should == true
    ModuleSpecs::Child.send(@method, ModuleSpecs::Child).should == true
    ModuleSpecs::Parent.send(@method, ModuleSpecs::Parent).should == true
    ModuleSpecs::Basic.send(@method, ModuleSpecs::Basic).should == true
    ModuleSpecs::Super.send(@method, ModuleSpecs::Super).should == true

    ModuleSpecs::Child.send(@method, ModuleSpecs).should == false
    ModuleSpecs::Child.send(@method, ModuleSpecs::Parent).should == false
    ModuleSpecs::Child.send(@method, ModuleSpecs::Basic).should == false
    ModuleSpecs::Child.send(@method, ModuleSpecs::Super).should == false
  end
end