Sha256: 5aab246203844387ec2571379c87ab304ef1b9770fbbcf3538f85640c6311dc2

Contents?: true

Size: 852 Bytes

Versions: 34

Compression:

Stored size: 852 Bytes

Contents

##
# Reset all DSL variables so specs don't interfere with each other.
#
def reset_dsl_variables(klass)
  reset_app_name(klass)
  reset_auto_paging_size(klass)
  reset_namespace(klass)
  reset_publishable_attributes(klass)
  reset_service_class(klass)
  reset_service_name(klass)
end

def reset_app_name(klass)
 klass.send(:instance_variable_set, :@app_name, nil)
end

def reset_auto_paging_size(klass)
 klass.send(:instance_variable_set, :@auto_paging_size, nil)
end

def reset_namespace(klass)
 klass.send(:instance_variable_set, :@namespace, nil)
end

def reset_publishable_attributes(klass)
 klass.send(:instance_variable_set, :@publishable_attributes, nil)
end

def reset_service_class(klass)
 klass.send(:instance_variable_set, :@service_class, nil)
end

def reset_service_name(klass)
 klass.send(:instance_variable_set, :@service_name, nil)
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
active_remote-3.3.3 spec/support/helpers.rb
active_remote-3.3.2 spec/support/helpers.rb
active_remote-3.3.1 spec/support/helpers.rb
active_remote-3.3.0 spec/support/helpers.rb
active_remote-3.2.2 spec/support/helpers.rb
active_remote-3.2.1 spec/support/helpers.rb
active_remote-3.2.0 spec/support/helpers.rb
active_remote-3.2.0.pre spec/support/helpers.rb
active_remote-3.1.3 spec/support/helpers.rb
active_remote-3.1.2 spec/support/helpers.rb
active_remote-3.1.2.pre spec/support/helpers.rb
active_remote-3.1.1 spec/support/helpers.rb
active_remote-3.1.0 spec/support/helpers.rb
active_remote-3.0.0 spec/support/helpers.rb
active_remote-3.0.0.pre1 spec/support/helpers.rb
active_remote-2.4.0 spec/support/helpers.rb
active_remote-2.3.5 spec/support/helpers.rb
active_remote-2.3.4 spec/support/helpers.rb
active_remote-2.3.3 spec/support/helpers.rb
active_remote-2.3.3.pre spec/support/helpers.rb