Sha256: 01fc40394b3a15f902fa2067d49f2ccfb0640519ec15395f82df4b80b6c74d67

Contents?: true

Size: 878 Bytes

Versions: 24

Compression:

Stored size: 878 Bytes

Contents

require 'support/models'

##
# 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

24 entries across 24 versions & 1 rubygems

Version Path
active_remote-2.0.0.rc1 spec/support/helpers.rb
active_remote-1.8.1 spec/support/helpers.rb
active_remote-1.8.0 spec/support/helpers.rb
active_remote-1.8.0.rc1 spec/support/helpers.rb
active_remote-1.7.1 spec/support/helpers.rb
active_remote-1.7.0 spec/support/helpers.rb
active_remote-1.6.1 spec/support/helpers.rb
active_remote-1.6.0 spec/support/helpers.rb
active_remote-1.5.9 spec/support/helpers.rb
active_remote-1.5.8 spec/support/helpers.rb
active_remote-1.5.7 spec/support/helpers.rb
active_remote-1.5.6 spec/support/helpers.rb
active_remote-1.5.5 spec/support/helpers.rb
active_remote-1.5.4 spec/support/helpers.rb
active_remote-1.5.2 spec/support/helpers.rb
active_remote-1.5.1 spec/support/helpers.rb
active_remote-1.5.0 spec/support/helpers.rb
active_remote-1.4.1 spec/support/helpers.rb
active_remote-1.4.0 spec/support/helpers.rb
active_remote-1.3.3 spec/support/helpers.rb