Hospedagem de código open source no Github Editor: Textmate, Vim, Gedit ou Rubymine Site oficial, Ruby Inside, Railscasts, Ruby Weekly, Blog Plataformatec, Simples Idéias Livros: Pragmatic Programmers, Getting Real, Poignant Guide,Agile Web Development, Crafting
have no elements'" do stack = Stack.new stack.empty?.should be_true end it "returns false when we have elements" do stack = Stack.new stack.push 1 stack.empty?.should_not be_true end end end
when we have elements Failure/Error: true.should be_false expected true to be false # ./spec/stack_spec.rb:9:in `block (2 levels) in <top (required)>' Finished in 0.02106 seconds 2 examples, 1 failure Failed examples: rspec ./spec/stack_spec.rb:8 # Returns false when we have elements
page When I click on "Sign up" And I fill in "Name" with "Random Company" And I fill in "E-mail" with "[email protected]" And I fill in "Password" with "123456" And I click on the "Sign up" button Then I should see a message saying "You have successfully signed in" And I should see a "Log out" link
|company| Company.create!( :name => company["Name"], :password => company["Password"], :email => company["E-mail"] ) end end When /^I click on "([^"]*)"$/ do |link_text| click_link link_text end Then /^I should see a message saying "([^"]*)"$/ do |message_text| within(".flash") do page.should have_content(message_text) end end
Part < ActiveRecord::Base has_and_belongs_to_many :models end class Car < ActiveRecord::Base belongs_to :model has_one :customization end class Customization < ActiveRecord::Base belongs_to :car end
Form de criação de produto POST /products Cria um produto GET /products/:id Mostra o produto cujo ID é :id GET /products/:id/edit Form de edição de produto PUT /products/:id Atualiza o produto cujo ID é :id DELETE /products/:id Remove o produto cujo ID é :id 7 “rotas padrões”
POST /profile Cria o perfil GET /profile Mostra o perfil GET /profile/edit Form de edição do perfil PUT /profile Atualiza o perfil DELETE /profile Exclui o perfil 6 “rotas padrões”
/betterexplained.com/articles/intermediate-rails-understanding-models- views-and-controllers/ Cilindro de Banco de Dados: http:/ /openclipart.org/detail/94723