Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

RSpec & Rails, an introduction

419 views

Published on

A presentation on newcomers to BDD on Rails.

Published in: Software
  • Login to see the comments

RSpec & Rails, an introduction

  1. 1. tdd : rails, rspec, etc. @utkukaynar, #LYK2016, #rails
  2. 2. Neden test? • SOLID, değişime dayanıklı kod • Kendi kendisini test eden yazılım • Müşteri / kullanıcıda patlamayan buglar • Kazanılan zaman • Çevik / sağlıklı yazılım geliştirme • daya-geç driven development
  3. 3. –Uncle Bob "What goes wrong with software? The software starts to rot. At first it isn’t so bad. An ugly wart here, a clumsy hack there, but the beauty of the design still shows through. Yet, over time as the rotting continues, the ugly festering sores and boils accumulate until they dominate the design of the application. The program becomes a festering mass of code that the developers find increasingly hard to maintain."
  4. 4. SOLID Single Responsibility Principle A class should have one, and only one, reason to change. Open Closed Principle You should be able to extend a classes behavior, without modifying it. Liskov Substitution Derived classes must be substitutable for their base classes. Interface Segregation Principle Make fine grained interfaces that are client specific. Dependency Injection Principle Depend on abstractions, not on concretions.
  5. 5. config/database.yml Gemfile rails db:test:prepare
  6. 6. rails g rspec:install create .rspec create spec create spec/spec_helper.rb create spec/rails_helper.rb

×