Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby on Rails - UNISO

lucas renan
October 29, 2012

Ruby on Rails - UNISO

Apresentação sobre Ruby on Rails na Semana de Informática da Universidade de Sorocaba. 29/out/2012

lucas renan

October 29, 2012
Tweet

More Decks by lucas renan

Other Decks in Technology

Transcript

  1. str = "ruby" puts str.class # String int = 100

    puts int.class # Fixnum puts nil.class # NilClass
  2. # application.rb # Pick the frameworks you want: # require

    "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie"
  3. describe Order do it "sums the prices of items" do

    order = Order.new order.add_entry(Item.new( :price => Money.new(1.11, :USD) )) order.add_entry(Item.new( :price => Money.new(2.22, :USD), :quantity => 2 )) order.total.should eq(Money.new(5.55, :USD)) end end