Sha256: 207fb47e7f94c818e5dca9326988d168d6748256ffd2168bab69fb34a4fb4219
Contents?: true
Size: 510 Bytes
Versions: 2
Compression:
Stored size: 510 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper' class ConfigurableTest < Presenting::Test class ConfigurableUser include Presenting::Configurable attr_accessor :first_name attr_reader :name end def test_setting_first_name_with_initializer user = ConfigurableUser.new(:first_name => "Bob") assert_equal 'Bob', user.first_name end def test_setting_unsettable_attribute assert_raises NoMethodError do ConfigurableUser.new(:name => 'Bob Jenkins') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
presenting-2.0.0 | test/configurable_test.rb |
presenting-1.0.0 | test/configurable_test.rb |