Class: TestOddbApp::StubRegistration

Inherits:
Object
  • Object
show all
Defined in:
test/test_util/oddbapp.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (StubRegistration) initialize(key = nil)

A new instance of StubRegistration



104
105
106
# File 'test/test_util/oddbapp.rb', line 104

def initialize(key=nil)
  @iksnr = key
end

Instance Attribute Details

- (Object) block_result (readonly)

Returns the value of attribute block_result



103
104
105
# File 'test/test_util/oddbapp.rb', line 103

def block_result
  @block_result
end

- (Object) iksnr (readonly)

Returns the value of attribute iksnr



103
104
105
# File 'test/test_util/oddbapp.rb', line 103

def iksnr
  @iksnr
end

Instance Method Details

- (Object) active_package_count



107
108
109
# File 'test/test_util/oddbapp.rb', line 107

def active_package_count
  3
end

- (Object) atcless_sequences



119
120
121
122
123
# File 'test/test_util/oddbapp.rb', line 119

def atcless_sequences
  [
    StubSequence.new('no_atc', nil)
  ]
end

- (Object) each_package(&block)



124
125
126
# File 'test/test_util/oddbapp.rb', line 124

def each_package(&block)
  @block_result = block.call(@iksnr)
end

- (Object) replace(registration)



110
111
# File 'test/test_util/oddbapp.rb', line 110

def replace(registration)
end

- (Object) sequences



112
113
114
115
116
117
118
# File 'test/test_util/oddbapp.rb', line 112

def sequences
  {
    :foo  => StubSequence.new('blah', StubAtcClassFactory.atc('1')),
    :bar  => StubSequence.new('blahdiblah', StubAtcClassFactory.atc('2')),
    :rob  => StubSequence.new('frohbus', nil),
  }
end