Sha256: f32d7dca31bb3820dc43f586615e31349821859f1ae265459b77c2ee4309ac5f
Contents?: true
Size: 631 Bytes
Versions: 22
Compression:
Stored size: 631 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 assert_equal "2", event2.id 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
22 entries across 22 versions & 1 rubygems