Sha256: 814308089b73d9db4bf3bdd046cb8d0f86b4ebd490b44434f84fce410010232d
Contents?: true
Size: 698 Bytes
Versions: 2
Compression:
Stored size: 698 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe 'basic setters' do before :all do TunableModel.has_settings \ :website => { super_mode: { default: false } } @model = TunableModel.create(name: "Yay, I'm settable!") end it 'has getters setters scoped by context' do expect(@model.respond_to?(:website_super_mode)).to eq(true) expect(@model.respond_to?(:website_super_mode=)).to eq(true) expect(@model.website_super_mode).to eq(false) expect(@model.website_super_mode = true).to eq(true) expect(@model.website_super_mode).to eq(false) @model.save expect(@model.website_super_mode).to eq(true) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tunable-0.0.7 | spec/tunable/getters_spec.rb |
tunable-0.0.6 | spec/tunable/getters_spec.rb |