Method: FlexMock#flexmock_based_on
- Defined in:
- lib/flexmock/core.rb
#flexmock_based_on(base_class) ⇒ Object
184 185 186 187 188 189 190 191 192 |
# File 'lib/flexmock/core.rb', line 184 def flexmock_based_on(base_class) @base_class = base_class if base_class <= Kernel if self.class != base_class should_receive(:class => base_class) should_receive(:kind_of?).and_return { |against| base_class <= against } end end end |