$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Amanda
January 21, 2016
Technology
0
220
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
76
Aprendizados de um projeto Elixir OTP
amandasposito
4
590
SOLID - Dependency inversion principle
amandasposito
0
80
Como concorrência funciona em Elixir?
amandasposito
1
230
Programação Funcional & Elixir
amandasposito
3
120
Ecto, você sabe o que é ?
amandasposito
4
240
Novidades no Rails 5
amandasposito
0
99
Elixir e Phoenix
amandasposito
3
570
Elixir em 5 minutos
amandasposito
1
93
Other Decks in Technology
See All in Technology
AWSインフルエンサーへの道 / load of AWS Influencer
whisaiyo
0
180
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
350
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
130
.NET 10の概要
tomokusaba
0
130
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.1k
WordPress は終わったのか ~今のWordPress の制作手法ってなにがあんねん?~ / Is WordPress Over? How We Build with WordPress Today
tbshiki
2
890
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
350
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
Snowflakeで実践する、生成AIを活用した「自然言語によるデータとの対話」
nayuts
0
130
AlmaLinux + KVM + Cockpit で始めるお手軽仮想化基盤 ~ 開発環境などでの利用を想定して ~
koedoyoshida
0
130
SREには開発組織全体で向き合う
koh_naga
0
390
ウェルネス SaaS × AI、1,000万ユーザーを支える 業界特化 AI プロダクト開発への道のり
hacomono
PRO
0
310
Featured
See All Featured
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
The SEO Collaboration Effect
kristinabergwall1
0
300
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
28
Context Engineering - Making Every Token Count
addyosmani
9
540
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
180
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
47
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
110
KATA
mclloyd
PRO
33
15k
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app