Sha256: 83a14548df21096e2285309984578c4a635253cae1342f4e3ff19d2db0f5cf14
Contents?: true
Size: 641 Bytes
Versions: 2
Compression:
Stored size: 641 Bytes
Contents
# encoding: UTF-8 require File.expand_path("./helper", File.dirname(__FILE__)) class Event < Ohm::Model attribute :name attribute :location end test "assign attributes from the hash" do event = Event.new(:name => "Ruby Tuesday") assert_equal event.name, "Ruby Tuesday" end test "assign an ID and save the object" do event1 = Event.create(:name => "Ruby Tuesday") event2 = Event.create(:name => "Ruby Meetup") assert_equal "1", event1.id.to_s assert_equal "2", event2.id.to_s end test "save the attributes in UTF8" do event = Event.create(:name => "32° Kisei-sen") assert "32° Kisei-sen" == Event[event.id].name end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ohm-2.0.0.rc1 | test/core.rb |
ohm-2.0.0.alpha5 | test/core.rb |