Sha256: 5c9f3bb8174524324ed2fb27676946f93d9bebf5e07f3ca334ba0d7c5eb3ebb5
Contents?: true
Size: 1.22 KB
Versions: 4
Compression:
Stored size: 1.22 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Gator::Configuration do before :all do class ConcreteConfiguration < Gator::Configuration end end after :all do remove_const ConcreteConfiguration end before :each do @configuration = ConcreteConfiguration.new end it "should add a property getter" do @configuration.add_configuration :my_prop @configuration.should respond_to "my_prop" end it "should add a property setter" do @configuration.add_configuration :my_prop @configuration.should respond_to "my_prop=" end it "should set and get a property via its setter" do a = {} @configuration.add_configuration :a @configuration.a= a @configuration.a.should eql(a) end it "should add a value" do a = {} @configuration.add_configuration :my_prop, a @configuration.my_prop.should eql(a) end it "should yield around a property" do a = {} @configuration.add_configuration :my_prop, a @configuration.my_prop do |property| property.should eql(a) end end it "should add a getter with a value" do a = {} @configuration.add_getter :my_getter, a @configuration.my_getter.should equal a end end
Version data entries
4 entries across 4 versions & 1 rubygems