Sha256: f7288f9d7c324a3d1c8cc878b56cf1bf9454d7ac4fa4cdbc53cadb9ecbcd5434
Contents?: true
Size: 715 Bytes
Versions: 2
Compression:
Stored size: 715 Bytes
Contents
require 'spec_helper' describe ConfigureMe::Setting do before(:each) do @owner = mock('owner') do stubs(:define_attribute_methods) end @setting = ConfigureMe::Setting.new(@owner, :foo, :string, :default => 'bar') end it { @setting.should respond_to(:name) } it { @setting.name.should eql('foo') } it { @setting.should respond_to(:default) } it { @setting.default.should eql('bar') } it "define_methods! should call the owner class's define_attribute_methods with false" do owner = mock('owner') do expects(:define_attribute_methods).with(true) end setting = ConfigureMe::Setting.new(owner, :foo, :string, :default => 'bar') setting.define_methods! end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
configure_me-0.3.2 | spec/configure_me/setting_spec.rb |
configure_me-0.3.1 | spec/configure_me/setting_spec.rb |