Sha256: 041d747a9ab33631f7cb3a952320007ecc4d134824922ffa1da965752e049181

Contents?: true

Size: 365 Bytes

Versions: 8

Compression:

Stored size: 365 Bytes

Contents

require "spec_helper"


describe String do 
  
  it "instance_variablizes by pre-pending an '@' and turning itself into a symbol" do 
    'my_test_string'.instance_variableize.should eq(:@my_test_string)
  end
  
  it "deinstance_variableizes by removing the leading '@" do
    '@instance_variable'.deinstance_variableize.should eq('instance_variable')
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
redis_backed_model-1.1.0 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-1.0.1 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-1.0.0 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-0.0.5 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-0.0.4 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-0.0.3 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-0.0.2 spec/redis_backed_model/inflections_spec.rb
redis_backed_model-0.0.1 spec/redis_backed_model/inflections_spec.rb