Class: RSpec::Bash::Mocks::Doubles::AbstractDouble

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/bash/mocks/doubles/abstract_double.rb

Direct Known Subclasses

ConditionalDouble, FunctionDouble

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAbstractDouble

Returns a new instance of AbstractDouble.



13
14
15
16
17
18
19
20
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 13

def initialize(*)
  @body = nil
  @call_original = false
  @calls = []
  @expected_call_count = [:at_least, 1]
  @expected_calls = []
  @subshell = true
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



6
7
8
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 6

def body
  @body
end

#call_originalObject

Returns the value of attribute call_original.



6
7
8
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 6

def call_original
  @call_original
end

#callsObject

Returns the value of attribute calls.



6
7
8
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 6

def calls
  @calls
end

#expected_call_countObject

Returns the value of attribute expected_call_count.



6
7
8
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 6

def expected_call_count
  @expected_call_count
end

#expected_callsObject

Returns the value of attribute expected_calls.



6
7
8
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 6

def expected_calls
  @expected_calls
end

#subshellObject

Returns the value of attribute subshell.



6
7
8
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 6

def subshell
  @subshell
end

Instance Method Details

#applyObject



22
23
24
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 22

def apply
  fail "NotImplemented"
end

#call_countObject



26
27
28
# File 'lib/rspec/bash/mocks/doubles/abstract_double.rb', line 26

def call_count
  fail "NotImplemented"
end